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

[clang][dataflow] Don't crash when BlockToState is called from unreachable path #65732

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

kinu
Copy link
Contributor

@kinu kinu commented Sep 8, 2023

When we call getEnvironment, BlockToState[BlockId] for the block can return null even if CFCtx.isBlockReachable(B) returns true if it is called from a particular block that is marked unreachable to the block.

@kinu kinu requested review from a team as code owners September 8, 2023 09:27
@github-actions github-actions bot added the clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html label Sep 8, 2023
@kinu
Copy link
Contributor Author

kinu commented Sep 8, 2023

What do you think about this crash fix? @martinboehme @Xazax-hun @ymand

…d block

When we call `getEnvironment`, `BlockToState[BlockId]` for the block can return
null even if CFCtx.isBlockReachable(B) returns true if it is called from a
particular block that is marked unreachable to the block.
(An example is in `EvaluateBlockWithUnreachablePreds` in TransferTest.cpp)
@ymand ymand merged commit 8e1d2f2 into llvm:main Sep 8, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants