[all-commits] [llvm/llvm-project] aa4dfd: [hwasan] Fix and re-enable deep-recursion.c (#69265)
Thurston Dang via All-commits
all-commits at lists.llvm.org
Mon Oct 16 22:46:42 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa4dfd3736dd1c2e0263eacd09bd613c5784ea73
https://github.com/llvm/llvm-project/commit/aa4dfd3736dd1c2e0263eacd09bd613c5784ea73
Author: Thurston Dang <thurston.dang at gmail.com>
Date: 2023-10-16 (Mon, 16 Oct 2023)
Changed paths:
M compiler-rt/test/hwasan/TestCases/deep-recursion.c
Log Message:
-----------
[hwasan] Fix and re-enable deep-recursion.c (#69265)
deep-recursion.c was disabled
(https://github.com/llvm/llvm-project/commit/c007e0f66ee3f96467fd12f6200218fb4c38c2c9)
because the test may get unlucky and end up with a zero-tagged variable,
leading to a false negative
(https://github.com/llvm/llvm-project/issues/69221).
This patch re-enables the test and adds a workaround: it checks
if the variable is zero-tagged, and if so, it will instead use the
neighboring variable, which must have a different (hence non-zero)
tag.
Fixing the stack allocation tagging is left as an exercise for the
reader. It is non-trivial because, even if the stackTagBase is
non-zero, tags for subsequent allocations in the stack frame may wrap
around to zero; working around this would require adding multiple
instructions to each alloca.
---------
Co-authored-by: Thurston Dang <thurston at google.com>
More information about the All-commits
mailing list