Commit 431cc86e authored by Adam Klein's avatar Adam Klein Committed by V8 LUCI CQ

[sandbox] Fix builds on win/mac

Extend V8_OS_LINUX ifdef guards to surround PrintToStderr() helper.

Change-Id: Ia27d532eef60aa162b99c6989b1312515a038110
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3708021
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81197}
parent 7ba853bb
......@@ -203,6 +203,7 @@ void SandboxTesting::InstallMemoryCorruptionApi(Isolate* isolate) {
namespace {
#ifdef V8_OS_LINUX
void PrintToStderr(const char* output) {
// NOTE: This code MUST be async-signal safe.
// NO malloc or stdio is allowed here.
......@@ -214,7 +215,6 @@ void PrintToStderr(const char* output) {
// outside of the sandbox address space. If inside, the signal is ignored and
// the process terminated normally, in the latter case the original signal
// handler is restored and the signal delivered again.
#ifdef V8_OS_LINUX
struct sigaction g_old_sigbus_handler, g_old_sigsegv_handler;
void SandboxSignalHandler(int signal, siginfo_t* info, void* void_context) {
// NOTE: This code MUST be async-signal safe.
......
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