Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FlattenLogMsg not properly working on nested structures #5036

Merged
merged 7 commits into from
Dec 6, 2024

Conversation

jhavrane
Copy link
Contributor

Fixes #5035.

Adds FlattenLogMsg to p4test/midend to test this.

@jhavrane jhavrane self-assigned this Nov 26, 2024
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
@jhavrane jhavrane marked this pull request as draft November 26, 2024 13:03
@fruffy
Copy link
Collaborator

fruffy commented Nov 26, 2024

This changes some reference files, which need to be updated by adding P4TEST_REPLACE=TRUE before ctest for example.

@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Nov 26, 2024
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
@jhavrane jhavrane force-pushed the jhavrane/fix_log_msg_struct branch from e21ccc3 to 43bf35b Compare November 29, 2024 15:33
@jhavrane jhavrane marked this pull request as ready for review December 2, 2024 08:58
@jhavrane
Copy link
Contributor Author

jhavrane commented Dec 2, 2024

Done. Updated reference files. Adding new pass to p4test's midend required a minor fix in ToP4 pass, which was not dumping error struct field type.

@jhavrane jhavrane requested review from fruffy and vlstill December 2, 2024 10:37
@vlstill vlstill requested a review from asl December 2, 2024 10:47
frontends/p4/toP4/toP4.cpp Outdated Show resolved Hide resolved
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
Copy link
Contributor

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on my review of the new test P4 program, and the updated expected outputs of one of the existing test programs. My review does not include the C++ implementation code changes. Please wait for someone else's review on that part of this PR before merging.

Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
@jhavrane jhavrane requested a review from asl December 5, 2024 12:43
Copy link
Contributor

@asl asl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jhavrane jhavrane added this pull request to the merge queue Dec 6, 2024
Merged via the queue into p4lang:main with commit cd56ab6 Dec 6, 2024
19 checks passed
@jhavrane jhavrane deleted the jhavrane/fix_log_msg_struct branch December 6, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using nested struct in log_msg crash
4 participants