This is an archive of the discontinued LLVM Phabricator instance.

Fix crash when getVFABIMappings is called with an indirect call instruction
ClosedPublic

Authored by sanwou01 on Jul 3 2020, 3:09 AM.

Diff Detail

Event Timeline

sanwou01 created this revision.Jul 3 2020, 3:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2020, 3:09 AM
fpetrogalli requested changes to this revision.Jul 6 2020, 8:10 AM
fpetrogalli added inline comments.
llvm/unittests/Analysis/VectorFunctionABITest.cpp
12

Is this needed?

632

Very elegant, but is this unique_ptr needed?

This revision now requires changes to proceed.Jul 6 2020, 8:10 AM
sanwou01 requested review of this revision.Jul 10 2020, 2:25 AM
sanwou01 marked 2 inline comments as done.
sanwou01 added inline comments.
llvm/unittests/Analysis/VectorFunctionABITest.cpp
12

For the definition of parseAssemblyString, yes.

632

"borrowed" from other unit tests, so I can only take credit for finding it. I do think the unique_ptr is needed: parseAssemblyString passes ownership of the Module to us, so it'd be rude to drop it on the floor.

fpetrogalli accepted this revision.Jul 13 2020, 6:41 AM

Thank you @sanwou01 ! LGTM, with a nit: please double check those header included are needed before submitting.

Cheers,

Francesco

llvm/unittests/Analysis/VectorFunctionABITest.cpp
12

Are you sure? parseAssemblyString is used on line 26, it works even without this include line. Can you double check this before submitting? Same for <memory>

632

:facepalm:, yes, I used unique_ptr too in the tests class VFABIParserTest. My bad.

This revision is now accepted and ready to land.Jul 13 2020, 6:41 AM
This revision was automatically updated to reflect the committed changes.