HomePhabricator

hwasan: Instrument globals.

Description

hwasan: Instrument globals.

Globals are instrumented by adding a pointer tag to their symbol values
and emitting metadata into a special section that allows the runtime to tag
their memory when the library is loaded.

Due to order of initialization issues explained in more detail in the comments,
shadow initialization cannot happen during regular global initialization.
Instead, the location of the global section is marked using an ELF note,
and we require libc support for calling a function provided by the HWASAN
runtime when libraries are loaded and unloaded.

Based on ideas discussed with @evgeny777 in D56672.

Differential Revision: https://reviews.llvm.org/D65770

Details

Committed
pccAug 6 2019, 3:07 PM
Differential Revision
D65770: hwasan: Instrument globals.
Parents
rL368101: [WebAssembly] Lower ASan constructor priority on Emscripten
Branches
Unknown
Tags
Unknown

Event Timeline