Skip to content

Fix segmentation failure in ConstantTypeSubstitution #5271

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vlstill
Copy link
Contributor

@vlstill vlstill commented May 14, 2025

fixes #5268.

As the getType(..., true) should fail with a BUG, I don't think we need to add anything more than just a check for the type being null. In the example from issue, there is a preceding type error which supresses the BUG_CHECK about unknown type (as the type map is possibly inconsistent due to previous errors).

vlstill added 2 commits May 14, 2025 12:45
Signed-off-by: Vladimir Still <[email protected]>
Signed-off-by: Vladimir Still <[email protected]>
@vlstill vlstill self-assigned this May 14, 2025
@vlstill vlstill added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label May 14, 2025
@vlstill vlstill marked this pull request as ready for review May 14, 2025 11:07
@vlstill vlstill requested review from asl and jhavrane May 14, 2025 11:07
@asl
Copy link
Contributor

asl commented May 14, 2025

@vlstill Looks like test is failing?

@ChrisDodd
Copy link
Contributor

Is the test supposed to fail? If so it should be in the p4_16_errors directory. In any case it needs expected outputs as well

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.

SIGSEGV in P4::ConstantTypeSubstitution
3 participants