llvm-project
9a8d45f6 - [Flang][OpenMP] Fix crash when block.end() is missed (#147519)

Commit
91 days ago
[Flang][OpenMP] Fix crash when block.end() is missed (#147519) As reported in #145917 and #147309, there are situation's where flang may crash. This is because `nextIt` in `RewriteOpenMPLoopConstruct` gets re-assigned when an iterator is erased from the block. If this is missed, Flang may attempt to access a location in memory that is not accessable and cause a compiler crash. This adds protection where the crash can occur, and a test with a reproducer that can trigger the crash. Fixes #147309
Author
Parents
Loading