Page MenuHomePhabricator

[CodeGen] Prevent nullptr deref in genAlternativeCodeSequence
ClosedPublic

Authored by fdeazeve on Wed, Mar 8, 10:07 AM.

Details

Summary

A pointer dereference was added (D141302) above an assert that checks
whether the pointer is null. This commit moves the assert above the
dereference and transforms it into an llvm_unreachable to better express
the intent that certain switch cases should never be reached.

Diff Detail

Event Timeline

fdeazeve created this revision.Wed, Mar 8, 10:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Mar 8, 10:07 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
fdeazeve requested review of this revision.Wed, Mar 8, 10:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Mar 8, 10:07 AM
fdeazeve updated this revision to Diff 503431.Wed, Mar 8, 10:09 AM

Update commit message

fdeazeve edited the summary of this revision. (Show Details)Wed, Mar 8, 10:10 AM
fdeazeve added a reviewer: fhahn.
fhahn accepted this revision.Wed, Mar 8, 10:38 AM

LGTM, thanks!

This revision is now accepted and ready to land.Wed, Mar 8, 10:38 AM
This revision was landed with ongoing or failed builds.Wed, Mar 8, 10:41 AM
This revision was automatically updated to reflect the committed changes.