v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
handler-inside-posix.h
Go to the documentation of this file.
1// Copyright 2018 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_TRAP_HANDLER_HANDLER_INSIDE_POSIX_H_
6#define V8_TRAP_HANDLER_HANDLER_INSIDE_POSIX_H_
7
8#include <signal.h>
9
10#include "include/v8config.h"
11
12namespace v8 {
13namespace internal {
14namespace trap_handler {
15
16#if V8_OS_LINUX || V8_OS_FREEBSD
17constexpr int kOobSignal = SIGSEGV;
18#elif V8_OS_DARWIN
19constexpr int kOobSignal = SIGBUS;
20#else
21#error Posix trap handlers are only supported on Linux, MacOSX and FreeBSD.
22#endif
23
24void HandleSignal(int signum, siginfo_t* info, void* context);
25
26bool TryHandleSignal(int signum, siginfo_t* info, void* context);
27
28} // namespace trap_handler
29} // namespace internal
30} // namespace v8
31
32#endif // V8_TRAP_HANDLER_HANDLER_INSIDE_POSIX_H_
bool TryHandleSignal(int signum, siginfo_t *info, void *context)
void HandleSignal(int signum, siginfo_t *info, void *context)