Skip to content
Unverified Commit ddf1de20 authored by Thurston Dang's avatar Thurston Dang Committed by GitHub
Browse files

[hwasan] Fix rare false negative (zero tag) in stack-uar.c (#69374)

stack-uar.c is flaky (1 in 256 executions) because the random tag
may be zero (https://github.com/llvm/llvm-project/issues/69221).

This patch works around the issue in the same way as deep-recursion.c

(https://github.com/llvm/llvm-project/commit/aa4dfd3736dd1c2e0263eacd09bd613c5784ea73

),
by falling back to a neighboring object, which must have a different
(non-zero) tag.

This patch also does a minor cleanup of the aforementioned
deep-recursion.c, for consistency with stack-uar.c.

Co-authored-by: default avatarThurston Dang <thurston@google.com>
parent 192d3320
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment