Commit ec1bf81b authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[trap-handler] Add missing newlines

If trap handlers cannot be installed, we printed two lines to stdout
and stderr, both not terminated by a newline. This CL adds a newline to
one output and uses the FATAL macro for the other, highlighting the
error better and showing the location where it happens.

R=eholk@chromium.org

Bug: v8:7570
Change-Id: Ic24f48f92b87528e0fd5889badf2c90d765e451a
Reviewed-on: https://chromium-review.googlesource.com/1047606Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53043}
parent 6e2f6a6c
......@@ -3320,8 +3320,7 @@ int Shell::Main(int argc, char* argv[]) {
if (V8_TRAP_HANDLER_SUPPORTED && i::FLAG_wasm_trap_handler) {
constexpr bool use_default_trap_handler = true;
if (!v8::V8::EnableWebAssemblyTrapHandler(use_default_trap_handler)) {
fprintf(stderr, "Could not register trap handler");
exit(1);
FATAL("Could not register trap handler");
}
}
......
......@@ -58,7 +58,7 @@ bool RegisterDefaultTrapHandler() {
if (installed_handler.sa_sigaction != HandleSignal) {
printf(
"WARNING: sanitizers are preventing signal handler installation. "
"Trap handlers are disabled.");
"Trap handlers are disabled.\n");
return false;
}
#endif
......
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