This is an archive of the discontinued LLVM Phabricator instance.

Fix crash in DebugInfoFinder when adding a module with forward declared composite type.
ClosedPublic

Authored by wanders on Apr 13 2015, 2:45 PM.

Details

Summary

The testcase that is included in the patch caused a crash when doing DebugInfoFinder::processModule on the module due to DCT->getElements() returning nullptr in DebugInfoFinder::processType.

By doing "DCT->getElements()" instead of "DCT->getElements()->operands()" one gets a DIArray instead of a raw MDTuple. The former has code to handle null as a 0-element array and therefore avoids the crash.

Diff Detail

Repository
rL LLVM

Event Timeline

wanders updated this revision to Diff 23698.Apr 13 2015, 2:45 PM
wanders retitled this revision from to Fix crash in DebugInfoFinder when adding a module with forward declared composite type..
wanders updated this object.
wanders edited the test plan for this revision. (Show Details)
wanders added reviewers: echristo, dexonsmith.
wanders set the repository for this revision to rL LLVM.
wanders added a subscriber: Unknown Object (MLST).
wanders updated this revision to Diff 23702.Apr 13 2015, 3:22 PM
wanders updated this object.
This revision was automatically updated to reflect the committed changes.