HomePhabricator

[dsymutil] Prevent use-after-free

Description

[dsymutil] Prevent use-after-free

The BinaryHolder would query the archive member MemoryBuffer name
to check if the current open archive also contains the next requested
objectfile. This comparison was using a StringRef to a temporary
buffer. It only happened with fat archives. This commit adds long-lived
storage along with the MemoryBuffers for the fat archive filename.

The added test would fail during an ASAN build without the fix.

Details

Committed
frissMay 9 2016, 7:44 AM
Parents
rL268923: Enable NamespaceLookupTestCase.
Branches
Unknown
Tags
Unknown