Reviewers: Sven Panne,

Message:
let's try this again

Description:
reland 16717: line up crashing with chrome

[email protected]
BUG=

Please review this at https://chromiumcodereview.appspot.com/23440044/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+20, -15 lines):
  M src/flag-definitions.h
  M src/platform-posix.cc
  M src/platform-win32.cc
  M src/platform.h
  M test/cctest/cctest.status
  M tools/run-deopt-fuzzer.py


Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index cc153af2542dfca612c4e12c579318931190acbd..8e77ac809e30b72c6d6f6037d62898932e268191 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -473,7 +473,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(break_on_abort, false, "always cause a debug break before aborting")

 // execution.cc
 // Slightly less than 1MB on 64-bit, since Windows' default stack size for
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index fe27eaf71f437fcc099ffdebb8e24f60c999921f..69303bfd80ce42278c830edfbd919d7391b83cb3 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -222,7 +222,7 @@ void OS::Abort() {
   if (FLAG_break_on_abort) {
     DebugBreak();
   }
-  abort();
+  V8_IMMEDIATE_CRASH();
 }


Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index 073b21a011aae732b7db5dc15ca3b18c85e3858b..7a90920a88b1809748eef69497c8434f80a0b402 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -872,10 +872,8 @@ 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);
   }
+  V8_IMMEDIATE_CRASH();
 }


Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index aa50cb4c7230f4dcfa9768faaddb0a4ed80e0b30..13c126bf42312ec8a5708a2ebcfe5fc670531457 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -51,6 +51,13 @@
 #include "utils.h"
 #include "v8globals.h"

+// This is lined up with blink's method of crashing.
+#if defined(__GNUC__)
+#define V8_IMMEDIATE_CRASH() __builtin_trap()
+#else
+#define V8_IMMEDIATE_CRASH() ((void(*)())0)()
+#endif
+
 #ifdef __sun
 # ifndef signbit
 namespace std {
Index: test/cctest/cctest.status
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index 85661098b2a285d35a1776ea2e1e6330c24f5c84..eb02169b1bbba5b8dd2037196560dc2acadfd9ab 100644
--- a/test/cctest/cctest.status
+++ b/test/cctest/cctest.status
@@ -28,7 +28,7 @@
 prefix cctest

 # All tests prefixed with 'Bug' are expected to fail.
-test-api/Bug*: FAIL
+test-api/Bug*: CRASH

##############################################################################
 # BUG(382): Weird test. Can't guarantee that it never times out.
@@ -40,21 +40,21 @@ test-api/InitializeAndDisposeMultiple: SKIP

 # These tests always fail.  They are here to test test.py.  If
 # they don't fail then test.py has failed.
-test-serialize/TestThatAlwaysFails: FAIL
-test-serialize/DependentTestThatAlwaysFails: FAIL
+test-serialize/TestThatAlwaysFails: CRASH
+test-serialize/DependentTestThatAlwaysFails: CRASH

# This test always fails. It tests that LiveEdit causes abort when turned off.
-test-debug/LiveEditDisabled: FAIL
+test-debug/LiveEditDisabled: CRASH

 # TODO(gc): Temporarily disabled in the GC branch.
-test-log/EquivalenceOfLoggingAndTraversal: PASS || FAIL
+test-log/EquivalenceOfLoggingAndTraversal: PASS || CRASH

 # We do not yet shrink weak maps after they have been emptied by the GC
-test-weakmaps/Shrinking: FAIL
-test-weaksets/WeakSet_Shrinking: FAIL
+test-weakmaps/Shrinking: CRASH
+test-weaksets/WeakSet_Shrinking: CRASH

 # Boot up memory use is bloated in debug mode.
-test-mark-compact/BootUpMemoryUse: PASS, PASS || FAIL if $mode == debug
+test-mark-compact/BootUpMemoryUse: PASS, PASS || CRASH if $mode == debug

 # Some CPU profiler tests are flaky.
 test-cpu-profiler/*: PASS || FLAKY
Index: tools/run-deopt-fuzzer.py
diff --git a/tools/run-deopt-fuzzer.py b/tools/run-deopt-fuzzer.py
index f8cc93748abab1b54610ac0e0d455efeef87f2c4..b9c85b3a4683b7ffa12036508e36e6e7db84221c 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"   : ["--nodead-code-elimination",
                  "--nofold-constants", "--enable-slow-asserts",
                  "--debug-code", "--verify-heap",
                  "--noconcurrent-recompilation"],
-    "release" : ["--nobreak-on-abort", "--nodead-code-elimination",
+    "release" : ["--nodead-code-elimination",
                  "--nofold-constants", "--noconcurrent-recompilation"]}

 SUPPORTED_ARCHS = ["android_arm",


--
--
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.

Reply via email to