Skip to content

Fix FlattenLogMsg not properly working on nested structures#5036

Merged
jhavrane merged 7 commits into
p4lang:mainfrom
jhavrane:jhavrane/fix_log_msg_struct
Dec 6, 2024
Merged

Fix FlattenLogMsg not properly working on nested structures#5036
jhavrane merged 7 commits into
p4lang:mainfrom
jhavrane:jhavrane/fix_log_msg_struct

Conversation

@jhavrane

Copy link
Copy Markdown
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

fruffy commented Nov 26, 2024

Copy link
Copy Markdown
Collaborator

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
Jiri Havranek added 4 commits November 27, 2024 10:41
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

jhavrane commented Dec 2, 2024

Copy link
Copy Markdown
Contributor Author

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
Comment thread testdata/p4_16_samples_outputs/issue2201-bmv2-midend.p4
Comment thread frontends/p4/toP4/toP4.cpp Outdated
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>

@jafingerhut jafingerhut left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread frontends/p4/toP4/toP4.cpp
Signed-off-by: Jiri Havranek <jiri.havranek@intel.com>
@jhavrane jhavrane requested a review from asl December 5, 2024 12:43

@asl asl left a comment

Copy link
Copy Markdown
Contributor

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
@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