This is an archive of the discontinued LLVM Phabricator instance.

MSan: handle callbr instructions
ClosedPublic

Authored by glider on Jul 2 2019, 6:11 AM.

Details

Summary

Handling callbr is very similar to handling an inline assembly call:
MSan must checks the instruction's inputs.
callbr doesn't (yet) have outputs, so there's nothing to unpoison,
and conservative assembly handling doesn't apply either.

Fixes PR42479.

Diff Detail

Repository
rL LLVM

Event Timeline

glider created this revision.Jul 2 2019, 6:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2019, 6:11 AM
eugenis accepted this revision.Jul 2 2019, 12:51 PM

LGTM w/ nit

llvm/test/Instrumentation/MemorySanitizer/msan_asm_conservative.ll
293 ↗(On Diff #207534)

This feels too vague. Could you add something to check that the warning is for a value coming from a function argument?

This revision is now accepted and ready to land.Jul 2 2019, 12:51 PM
glider updated this revision to Diff 207728.Jul 3 2019, 2:22 AM

Fixed the test

This revision was automatically updated to reflect the committed changes.