This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix null pointer in createInitTLSFunction
ClosedPublic

Authored by quantum on Aug 5 2019, 6:04 PM.

Details

Summary

createSyntheticSymbols, which creates WasmSym::InitTLS, is only called
when !config->relocatable, but this condition is not checked when calling
createInitTLSFunction.

This diff checks !config->relocatable before calling createInitTLSFunction.

Fixes https://github.com/emscripten-core/emscripten/issues/9155.

Diff Detail

Repository
rL LLVM

Event Timeline

quantum created this revision.Aug 5 2019, 6:04 PM
tlively accepted this revision.Aug 5 2019, 7:29 PM
This revision is now accepted and ready to land.Aug 5 2019, 7:29 PM

Oops it would be good to have a test, too ;)

quantum updated this revision to Diff 213663.Aug 6 2019, 11:22 AM

Add test to check --relocatable with --shared-memory.

tlively accepted this revision.Aug 6 2019, 1:01 PM
This revision was automatically updated to reflect the committed changes.