From ab44d145bb9806fa363d79e49b4190c62fcd669f Mon Sep 17 00:00:00 2001 From: Neel Natu Date: Mon, 15 Jul 2019 15:21:12 -0700 Subject: [PATCH] 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 --- test/syscalls/linux/sigaltstack.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(&stack.ss_sp) + SIGSTKSZ; // Expected top. + static_cast(stack.ss_sp) + SIGSTKSZ; // Expected top. badhandler_recursive_faults = 0; // Disable refault. Fault(); EXPECT_TRUE(badhandler_on_sigaltstack);