This is an archive of the discontinued LLVM Phabricator instance.

Fix incorrect call to ExprResult::get()
ClosedPublic

Authored by arichardson on Jun 10 2020, 12:34 PM.

Details

Summary

Res is already a ExprResult, so if we call .get() we convert an
ExprError() result into an unset result. I discovered this in our
downstream CHERI target where this resulted in a crash due to a
NULL-dereference.
It appears that this was introduced in SVN revision 201788 (8690a6860a45ba36e39b4ff0dbe434195e125d11)

Diff Detail

Event Timeline

arichardson created this revision.Jun 10 2020, 12:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2020, 12:34 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Anastasia accepted this revision.Jun 11 2020, 1:40 PM

LGTM! Thanks! Great spot!

This revision is now accepted and ready to land.Jun 11 2020, 1:40 PM
This revision was automatically updated to reflect the committed changes.