Commit 499b31e2 authored by dcarney@chromium.org's avatar dcarney@chromium.org

Crash like chrome. Currently, most chrome crashes do not yield useful stack...

Crash like chrome.  Currently, most chrome crashes do not yield useful stack traces as v8 does a silent abort and chrome's crash symbolization does not kick in.

R=svenpanne@chromium.org

BUG=

Review URL: https://codereview.chromium.org/179793004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 27b670ae
......@@ -470,7 +470,7 @@ DEFINE_bool(debugger_auto_break, true,
"automatically set the debug break flag when debugger commands are "
"in the queue")
DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature")
DEFINE_bool(break_on_abort, true, "always cause a debug break before aborting")
DEFINE_bool(hard_abort, true, "abort by crashing")
// execution.cc
// Slightly less than 1MB on 64-bit, since Windows' default stack size for
......
......@@ -390,6 +390,12 @@ F FUNCTION_CAST(Address addr) {
#define DISABLE_ASAN
#endif
#if V8_CC_GNU
#define V8_IMMEDIATE_CRASH() __builtin_trap()
#else
#define V8_IMMEDIATE_CRASH() ((void(*)())0)()
#endif
// -----------------------------------------------------------------------------
// Forward declarations for frequently used classes
......
......@@ -265,10 +265,10 @@ void OS::Sleep(int milliseconds) {
void OS::Abort() {
// Redirect to std abort to signal abnormal program termination.
if (FLAG_break_on_abort) {
DebugBreak();
if (FLAG_hard_abort) {
V8_IMMEDIATE_CRASH();
}
// Redirect to std abort to signal abnormal program termination.
abort();
}
......
......@@ -923,12 +923,11 @@ void OS::Sleep(int milliseconds) {
void OS::Abort() {
if (IsDebuggerPresent() || FLAG_break_on_abort) {
DebugBreak();
} else {
// Make the MSVCRT do a silent abort.
raise(SIGABRT);
if (FLAG_hard_abort) {
V8_IMMEDIATE_CRASH();
}
// Make the MSVCRT do a silent abort.
raise(SIGABRT);
}
......
......@@ -55,11 +55,11 @@ TIMEOUT_SCALEFACTOR = {"debug" : 4,
"release" : 1 }
MODE_FLAGS = {
"debug" : ["--nobreak-on-abort", "--nodead-code-elimination",
"debug" : ["--nohard-abort", "--nodead-code-elimination",
"--nofold-constants", "--enable-slow-asserts",
"--debug-code", "--verify-heap",
"--noconcurrent-recompilation"],
"release" : ["--nobreak-on-abort", "--nodead-code-elimination",
"release" : ["--nohard-abort", "--nodead-code-elimination",
"--nofold-constants", "--noconcurrent-recompilation"]}
SUPPORTED_ARCHS = ["android_arm",
......
......@@ -63,10 +63,10 @@ VARIANT_FLAGS = {
VARIANTS = ["default", "stress", "nocrankshaft"]
MODE_FLAGS = {
"debug" : ["--nobreak-on-abort", "--nodead-code-elimination",
"debug" : ["--nohard-abort", "--nodead-code-elimination",
"--nofold-constants", "--enable-slow-asserts",
"--debug-code", "--verify-heap"],
"release" : ["--nobreak-on-abort", "--nodead-code-elimination",
"release" : ["--nohard-abort", "--nodead-code-elimination",
"--nofold-constants"]}
GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction",
......
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