memunreachable_test: don't use `write` to escape addresses
A recent change (https://android-review.googlesource.com/c/platform/bionic/+/961601) caused this test to fail. This change allowed LLVM to optimize what was previously `__write_chk` into a standard call to `write`. LLVM knows things about `write`. In particular, it knows that `write` doesn't capture its buffer param, which `Ref` assumes isn't possible. LLVM can't reason much about `volatile` operations; storing this to a `volatile` ptr should be good enough. If not, there are a few other tricks we can play here. Bug: 133479661 Test: `atest memunreachable_test:memunreachable_test.MemunreachableTest#stack -- --abi x86` on internal-master Change-Id: I905e510210cafdf83fa1b50f2f090d4f8b9653da
Loading
Please register or sign in to comment