Commit d500b7b8 authored by Samuel Groß's avatar Samuel Groß Committed by V8 LUCI CQ

[sandbox] Treat nullptr dereferences as harmless in sandbox crash filter

Bug: v8:12878
Change-Id: I79ca182fcf59f520cdf8f25dd0daac9ced07881a
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3707283
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81222}
parent 5f914d92
...@@ -236,6 +236,16 @@ void SandboxSignalHandler(int signal, siginfo_t* info, void* void_context) { ...@@ -236,6 +236,16 @@ void SandboxSignalHandler(int signal, siginfo_t* info, void* void_context) {
_exit(0); _exit(0);
} }
if (faultaddr < 0x1000) {
// Nullptr dereferences are harmless as nothing can be mapped there. We use
// the typical page size (which is also the default value of mmap_min_addr
// on Linux) to determine what counts as a nullptr dereference here.
PrintToStderr(
"Caught harmless memory access violaton (nullptr dereference). Exiting "
"process...\n");
_exit(0);
}
if (info->si_code == SI_KERNEL && faultaddr == 0) { if (info->si_code == SI_KERNEL && faultaddr == 0) {
// This combination appears to indicate a crash at a non-canonical address // This combination appears to indicate a crash at a non-canonical address
// on Linux. Crashes at non-canonical addresses are for example caused by // on Linux. Crashes at non-canonical addresses are for example caused by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment