[sanitizer][aarch64] Add cast to drop reliance on the type of uc_mcontext.__reserved
authorFangrui Song <i@maskray.me>
Sun, 7 Nov 2021 06:26:05 +0000 (22:26 -0800)
committerFangrui Song <i@maskray.me>
Sun, 7 Nov 2021 06:26:05 +0000 (23:26 -0700)
commit70986ea3d6aeacb5d10bfe3b75757611d4e7a379
treeed6e3c7d6822769de3341873e5165b91103f2cc5
parent815b9f53d85e32e13bf318be24e7ece0617ff85d
[sanitizer][aarch64] Add cast to drop reliance on the type of uc_mcontext.__reserved

https://sourceware.org/bugzilla/show_bug.cgi?id=22742
uc_mcontext.__reserved probably should not be considered user visible API but
unfortunate it is: it is the only way to access cpu states of some Linux
asm/sigcontext.h extensions. That said, the declaration may be
long double __reserved[256]; (used by musl)
instead of
unsigned char __reserved[4096] __attribute__((__aligned__(16))); (glibc)
to avoid dependency on a GNU variable attribute.
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp