HomePhabricator

[asan] Make GetCurrentThread RTEMS-friendly

Description

[asan] Make GetCurrentThread RTEMS-friendly

On RTEMS, system and user code all live in a single binary and address
space. There is no clean separation, and instrumented code may
execute before the ASan run-time is initialized (or after it has been
destroyed).

Currently, GetCurrentThread() may crash if it's called before ASan
run-time is initialized. Make it return nullptr instead.

Similarly, fix __asan_handle_no_return so that it gives up rather than
try something that may crash.

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

Details

Committed
waltlMay 21 2018, 1:43 PM
Differential Revision
D46459: [asan] Make GetCurrentThread RTEMS-friendly
Branches
Unknown
Tags
Unknown