This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix crash when relocation synbol is not live
ClosedPublic

Authored by sbc100 on May 22 2018, 5:53 PM.

Details

Summary

When a symbol is GC'd it can still be referenced by relocations
in the debug sections, but such symbols are not assigned virtual
addresses.

This change adds a new global data symbol which gets gc'd but
should still appears in the output debug info, albeit with a 0
address.

Fixes 37555

Event Timeline

sbc100 created this revision.May 22 2018, 5:53 PM
sbc100 edited the summary of this revision. (Show Details)
yurydelendik accepted this revision.May 22 2018, 6:02 PM

Looks good. Thank you.

wasm/InputFiles.cpp
129

I'm not sure about code formatting here: do we need braces for outer if since it has a two line body now?

This revision is now accepted and ready to land.May 22 2018, 6:02 PM
This revision was automatically updated to reflect the committed changes.