This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Terminate analysis on OpenMP code instead of crashing
ClosedPublic

Authored by a.sidorin on Mar 3 2017, 1:47 AM.

Details

Summary

ExprEngine assumes that OpenMP statements should never appear in CFG. However, current CFG doesn't know anything about OpenMP and passes such statements as CFG nodes causing "UNREACHABLE executed!" crashes. Since I have no ideas on OpenMP implementation in ExprEngine or CFG, I'm changing the behaviour to stop the analysis on OpenMP statements to avoid crashes.

Diff Detail

Repository
rL LLVM

Event Timeline

a.sidorin created this revision.Mar 3 2017, 1:47 AM

git blame shows that OMP* statements were added to the switch block by different authors while OpenMP support in clang was implemented. Looks like they were put to "Should not appear" section instead of "Unsupported" by mistake.

dcoughlin accepted this revision.Mar 3 2017, 8:11 AM

Thanks for fixing this! It looks like this is tracked by PR31835. https://bugs.llvm.org//show_bug.cgi?id=31835

This revision is now accepted and ready to land.Mar 3 2017, 8:11 AM
This revision was automatically updated to reflect the committed changes.

Thank you Devin. Should we submit this to 4.0? I guess there are not many users of both CSA and OpenMP but PR you pointed is already the second report about this issue I see.

@zaks.anna: What do you think? Should we try to get this into clang 4.0?