[all-commits] [llvm/llvm-project] fdac18: [hwasan] Fix rare false negative (zero tag) in two...
Thurston Dang via All-commits
all-commits at lists.llvm.org
Thu Oct 19 09:14:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fdac18c2e23aaf769b7d5a2fa2b6135311fad69f
https://github.com/llvm/llvm-project/commit/fdac18c2e23aaf769b7d5a2fa2b6135311fad69f
Author: Thurston Dang <thurston.dang at gmail.com>
Date: 2023-10-19 (Thu, 19 Oct 2023)
Changed paths:
M compiler-rt/test/hwasan/TestCases/stack-history-length.c
M compiler-rt/test/hwasan/TestCases/stack-uas.c
Log Message:
-----------
[hwasan] Fix rare false negative (zero tag) in two more test cases (#69491)
stack-uas.c and stack-history-length.c both have
-hwasan-record-stack-history=libcall, which makes the stack base
tag fully randomized. They may therefore sometimes have a zero tag
for a stack allocated variable, resulting in a false negative
(https://github.com/llvm/llvm-project/issues/69221#issuecomment-1767322411).
This patch applies the same workaround as used for deep-recursion.c
(https://github.com/llvm/llvm-project/commit/aa4dfd3736dd1c2e0263eacd09bd613c5784ea73)
and stack-uar.c
(https://github.com/llvm/llvm-project/commit/ddf1de20a3f7db3bca1ef6ba7e6cbb90aac5fd2d):
have two adjacent stack-allocated variables, and use whichever is not
zero-tagged.
These are the last remaining test cases that use
-hwasan-record-stack-history=libcall.
stack-uas flakiness spotted in the wild:
https://lab.llvm.org/buildbot/#/builders/269/builds/549/steps/11/logs/stdio
stack-history-length:
https://lab.llvm.org/buildbot/#/builders/269/builds/537
Co-authored-by: Thurston Dang <thurston at google.com>
More information about the All-commits
mailing list