Commit 0933c6d4 authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cpu-profiler] Set SA_ONSTACK for the signal handler

This has no effect on our normal V8 builds as we don't set an
alternate stack.

Embedders like Go have to use alt stacks so this makes them work
with V8 if they have set up an alt stack themselves.

Change-Id: Icf3f4b39c026948875f5b2762ea6ffabaab03e8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2505718Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70855}
parent 014112a8
......@@ -329,9 +329,9 @@ class SignalHandler {
sa.sa_sigaction = &HandleProfilerSignal;
sigemptyset(&sa.sa_mask);
#if V8_OS_QNX
sa.sa_flags = SA_SIGINFO;
sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
#else
sa.sa_flags = SA_RESTART | SA_SIGINFO;
sa.sa_flags = SA_RESTART | SA_SIGINFO | SA_ONSTACK;
#endif
signal_handler_installed_ =
(sigaction(SIGPROF, &sa, &old_signal_handler_) == 0);
......
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