aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-iterator.c
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2020-12-01 11:40:18 +0000
committerMatthew Malcomson <matthew.malcomson@arm.com>2020-12-01 11:40:18 +0000
commitd66db7412ee8e16e08b340767f4c00a3b570e730 (patch)
tree50cae150300cc4c15883b4d890a453529d1e06e6 /gcc/tree-iterator.c
parent31f76c9065b4579d263586b069cea2e79a2c4203 (diff)
downloadgcc-d66db7412ee8e16e08b340767f4c00a3b570e730.zip
gcc-d66db7412ee8e16e08b340767f4c00a3b570e730.tar.gz
gcc-d66db7412ee8e16e08b340767f4c00a3b570e730.tar.bz2
testsuite: Correct check_effective_target_hwaddress_exec
This test should ensure that we can compile with hwasan, that such a compiled binary runs as expected, *and* that we're running on a kernel which implements the capability to ignore the top bytes of pointers in syscalls. It was expected that a basic test of `int main(void) { return 0; }` would check this, since there is a check called during `__hwasan_init` in libhwasan to ensure that the kernel we're running on provides a `prctl` to request the relaxed ABI. Unfortunately, the check in libhwasan has a bug in it, and does not correctly fail when the kernel feature is not around. This means that check is not automatically provided by the runtime. The sanitizer runtime will be fixed but would like to install this fix here in case fixing the library is not quick enough for the release (and so that people running the testsuite do not see spurious errors in the meantime). Tested by running testsuite on an AArch64 machine with and without the required kernel. Observed that the test does indeed fail when the kernel feature is unavailable and pass when the feature is available. Note that this test is directly targetting AArch64 by using `prctl` numbers specific to it. That's unfortunate, but once the runtime fix has gone in we will be able to remove that requirement. Ok for trunk? gcc/testsuite/ChangeLog: * lib/hwasan-dg.exp (check_effective_target_hwaddress_exec): Fix check for correct kernel version.
Diffstat (limited to 'gcc/tree-iterator.c')
0 files changed, 0 insertions, 0 deletions