This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add bounds check before use on returned iterator.
ClosedPublic

Authored by anmolparalkar-nxp on Aug 10 2023, 8:22 PM.

Details

Summary

Check iterator validity before use; fixes crash seen in the RISC-V
Zcmp Push/Pop optimization when compiling internal benchmark.

Includes test case (pre fix reproducer derived using bugpoint).

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 8:22 PM
anmolparalkar-nxp requested review of this revision.Aug 10 2023, 8:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 8:22 PM
wangpc accepted this revision.Aug 10 2023, 10:08 PM

LGTM.

This revision is now accepted and ready to land.Aug 10 2023, 10:08 PM
asb accepted this revision.Aug 14 2023, 2:41 AM

LGTM.