[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@google.com>
Loading
Please sign in to comment