Reviewers: Sven Panne,
Message:
Committed patchset #1 manually as r19544 (tree was closed).
Description:
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=
Committed: https://code.google.com/p/v8/source/detail?r=19544
Please review this at https://codereview.chromium.org/179793004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+18, -13 lines):
M src/flag-definitions.h
M src/globals.h
M src/platform-posix.cc
M src/platform-win32.cc
M tools/run-deopt-fuzzer.py
M tools/run-tests.py
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
13de6b56eedd5b171d2e8ba2768a3ac6998b9e2e..e7da42e6e0b7573162c9688270c5e7b97839e1e0
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -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
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index
8a67632d2cd74284b1c61807608a5ed8cb071465..ac5b71067baba5d3913ae9a8cd35a57db571f849
100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -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
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index
b5ab0cfef118d5c9402ba1ee97914926c5c036b9..c91cf241960d5a245abca3f8277c43c32e27d951
100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -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();
}
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index
56261735b871ee2166498f877ced615baf4efa7f..446caeea84d6fcc32213e2565b924c792f11bf07
100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -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);
}
Index: tools/run-deopt-fuzzer.py
diff --git a/tools/run-deopt-fuzzer.py b/tools/run-deopt-fuzzer.py
index
489f447bf2d00cefcb648ba8c03d2a84d1072a07..b809fdf988029bc623372d7152d2829ce5aef2cc
100755
--- a/tools/run-deopt-fuzzer.py
+++ b/tools/run-deopt-fuzzer.py
@@ -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",
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index
de45934a218dfee766a739735edf1de5b4a592f3..46f5db0f4817654b953c1d284feffd23f16fa0c5
100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -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",
--
--
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.