Index: sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc |
diff --git a/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc b/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc |
index d4491561c0d72f25b3cfaf70b9e12b51d0c0905e..05250d147f64409401d78afbcd24f8f6d9e1a502 100644 |
--- a/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc |
+++ b/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc |
@@ -188,12 +188,9 @@ intptr_t SIGSYSKillFailure(const struct arch_seccomp_data& args, |
static const char kSeccompKillError[] = |
__FILE__":**CRASHING**:" SECCOMP_MESSAGE_KILL_CONTENT "\n"; |
WriteToStdErr(kSeccompKillError, sizeof(kSeccompKillError) - 1); |
- // Make "request" volatile so that we can see it on the stack in a minidump. |
- volatile uint64_t pid = args.args[0]; |
- volatile char* addr = reinterpret_cast<volatile char*>(pid & 0xFFF); |
- *addr = '\0'; |
- // Hit the NULL page if this fails. |
- addr = reinterpret_cast<volatile char*>(pid & 0xFFF); |
+ // Make "pid" volatile so that we can see it on the stack in a minidump. |
+ volatile uint64_t my_pid = sys_getpid(); |
+ volatile char* addr = reinterpret_cast<volatile char*>(my_pid & 0xFFF); |
*addr = '\0'; |
for (;;) |
_exit(1); |