This is an archive of the discontinued LLVM Phabricator instance.

Fix assertion failure on DeferredDeclsToEmit.
AbandonedPublic

Authored by logan on Oct 11 2014, 12:44 PM.

Details

Reviewers
rafael
Summary

The assertion failure will be raised by TryEmitDefinitionAsAlias()
because it will call Entry->replaceAllUsesWith(Alias) and Entry
might be hold by the AssertingVH, which will become a dangling
pointer after RAUW.

This commit fixes the problem by replacing AssertingVH with
TrackingVH.

Note: This issue is partially fixed by r217874, since the usage of
GetAddrOfGlobal() is replaced by getAddrOfCXXStructor() with DontDefer=true.

Diff Detail

Event Timeline

logan updated this revision to Diff 14773.Oct 11 2014, 12:44 PM
logan retitled this revision from to Fix assertion failure on DeferredDeclsToEmit..
logan updated this object.
logan edited the test plan for this revision. (Show Details)
logan added a reviewer: rafael.
logan added a subscriber: Unknown Object (MLST).
rafael edited edge metadata.Jan 23 2015, 1:40 PM

Gah, so sorry. I just found this in my mail box.

I committed what is effectively the same patch in r226896 :-(

logan abandoned this revision.Jan 26 2015, 10:24 AM

Thanks. rL226896 works for me. Abandon this change.