diff options
author | Neel Natu <neelnatu@google.com> | 2019-07-15 15:21:12 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-15 15:22:24 -0700 |
commit | ab44d145bb9806fa363d79e49b4190c62fcd669f (patch) | |
tree | 8dce5e42d8d25c50fa825bd9f66b1e44cd384dd4 /test | |
parent | 9b4d3280e172063a6563d9e72a75b500442ed9b9 (diff) |
Fix initialization of badhandler_low_water_mark in SigaltstackTest.
It is now correctly initialized to the top of the signal stack.
Previously it was initialized to the address of 'stack.ss_sp' on
the main thread stack.
PiperOrigin-RevId: 258248363
Diffstat (limited to 'test')
-rw-r--r-- | test/syscalls/linux/sigaltstack.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/syscalls/linux/sigaltstack.cc b/test/syscalls/linux/sigaltstack.cc index 7d4a12c1d..69b6e4f90 100644 --- a/test/syscalls/linux/sigaltstack.cc +++ b/test/syscalls/linux/sigaltstack.cc @@ -175,7 +175,7 @@ TEST(SigaltstackTest, WalksOffBottom) { // Trigger a single fault. badhandler_low_water_mark = - reinterpret_cast<char*>(&stack.ss_sp) + SIGSTKSZ; // Expected top. + static_cast<char*>(stack.ss_sp) + SIGSTKSZ; // Expected top. badhandler_recursive_faults = 0; // Disable refault. Fault(); EXPECT_TRUE(badhandler_on_sigaltstack); |