Merge "memunreachable_test: don't use `write` to escape addresses"

This commit is contained in:
Treehugger Robot 2019-05-25 00:20:24 +00:00 committed by Gerrit Code Review
commit f261f518ea
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,8 @@ class HiddenPointer {
// Trick the compiler into thinking a value on the stack is still referenced.
static void Ref(void** ptr) {
write(0, ptr, 0);
void** volatile storage;
storage = ptr;
}
class MemunreachableTest : public ::testing::Test {