Commit 0ebb7560 authored by Mitch Phillips's avatar Mitch Phillips
Browse files

[hwasan] Add __hwasan_init constructor to runtime lib.

Found by an Android toolchain upgrade, inherited module constructors
(like init_have_lse_atomics from the builtins) can sneak into the hwasan
runtime. If these inherited constructors call hwasanified libc
functions, then the HWASan runtime isn't setup enough, and the code
crashes.

Mark the initialized as a high-priority initializer to fix this.

Reviewed By: pcc, yabinc

Differential Revision: https://reviews.llvm.org/D107391
parent 440d9712
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment