Revision: 19544
Author: [email protected]
Date: Tue Feb 25 13:53:06 2014 UTC
Log: 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.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/179793004
http://code.google.com/p/v8/source/detail?r=19544
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/globals.h
/branches/bleeding_edge/src/platform-posix.cc
/branches/bleeding_edge/src/platform-win32.cc
/branches/bleeding_edge/tools/run-deopt-fuzzer.py
/branches/bleeding_edge/tools/run-tests.py
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Thu Feb 20 21:03:26 2014
UTC
+++ /branches/bleeding_edge/src/flag-definitions.h Tue Feb 25 13:53:06 2014
UTC
@@ -470,7 +470,7 @@
"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
=======================================
--- /branches/bleeding_edge/src/globals.h Wed Feb 12 09:19:30 2014 UTC
+++ /branches/bleeding_edge/src/globals.h Tue Feb 25 13:53:06 2014 UTC
@@ -390,6 +390,12 @@
#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
=======================================
--- /branches/bleeding_edge/src/platform-posix.cc Wed Feb 12 09:19:30 2014
UTC
+++ /branches/bleeding_edge/src/platform-posix.cc Tue Feb 25 13:53:06 2014
UTC
@@ -265,10 +265,10 @@
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();
}
=======================================
--- /branches/bleeding_edge/src/platform-win32.cc Mon Jan 27 06:36:10 2014
UTC
+++ /branches/bleeding_edge/src/platform-win32.cc Tue Feb 25 13:53:06 2014
UTC
@@ -923,12 +923,11 @@
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);
}
=======================================
--- /branches/bleeding_edge/tools/run-deopt-fuzzer.py Fri Jan 31 09:10:56
2014 UTC
+++ /branches/bleeding_edge/tools/run-deopt-fuzzer.py Tue Feb 25 13:53:06
2014 UTC
@@ -55,11 +55,11 @@
"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",
=======================================
--- /branches/bleeding_edge/tools/run-tests.py Wed Feb 12 09:19:30 2014 UTC
+++ /branches/bleeding_edge/tools/run-tests.py Tue Feb 25 13:53:06 2014 UTC
@@ -63,10 +63,10 @@
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",
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.