Title: [219098] trunk/Source/_javascript_Core
Revision
219098
Author
[email protected]
Date
2017-07-03 14:51:01 -0700 (Mon, 03 Jul 2017)

Log Message

Add better crash logging for allocation sinking phase
https://bugs.webkit.org/show_bug.cgi?id=174102
<rdar://problem/33112092>

Rubber stamped by Filip Pizlo.

I'm trying to gather better information from crashlogs about why
we're crashing in the allocation sinking phase. I'm adding a allocation
sinking specific RELEASE_ASSERT as well as marking a few functions as
NEVER_INLINE to have the stack traces in the crash trace contain more
actionable information.

* dfg/DFGObjectAllocationSinkingPhase.cpp:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (219097 => 219098)


--- trunk/Source/_javascript_Core/ChangeLog	2017-07-03 21:49:05 UTC (rev 219097)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-07-03 21:51:01 UTC (rev 219098)
@@ -1,3 +1,19 @@
+2017-07-03  Saam Barati  <[email protected]>
+
+        Add better crash logging for allocation sinking phase
+        https://bugs.webkit.org/show_bug.cgi?id=174102
+        <rdar://problem/33112092>
+
+        Rubber stamped by Filip Pizlo.
+
+        I'm trying to gather better information from crashlogs about why
+        we're crashing in the allocation sinking phase. I'm adding a allocation
+        sinking specific RELEASE_ASSERT as well as marking a few functions as
+        NEVER_INLINE to have the stack traces in the crash trace contain more
+        actionable information.
+
+        * dfg/DFGObjectAllocationSinkingPhase.cpp:
+
 2017-07-03  Sam Weinig  <[email protected]>
 
         [WebIDL] Remove more unnecessary uses of the preprocessor in idl files

Modified: trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp (219097 => 219098)


--- trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp	2017-07-03 21:49:05 UTC (rev 219097)
+++ trunk/Source/_javascript_Core/dfg/DFGObjectAllocationSinkingPhase.cpp	2017-07-03 21:51:01 UTC (rev 219098)
@@ -48,6 +48,19 @@
 
 namespace {
 
+NO_RETURN_DUE_TO_CRASH NEVER_INLINE void crash(const char*, int line, int)
+{
+    CRASH_WITH_SECURITY_IMPLICATION_AND_INFO(line);
+}
+
+#undef RELEASE_ASSERT
+#define RELEASE_ASSERT(assertion) do { \
+    if (!(assertion)) { \
+        WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion); \
+        crash(__FILE__, __LINE__, __COUNTER__); \
+    } \
+} while (0)
+
 bool verbose = false;
 
 // In order to sink object cycles, we use a points-to analysis coupled
@@ -1906,7 +1919,7 @@
         }
     }
 
-    Node* resolve(BasicBlock* block, PromotedHeapLocation location)
+    NEVER_INLINE Node* resolve(BasicBlock* block, PromotedHeapLocation location)
     {
         // If we are currently pointing to a single local allocation,
         // simply return the associated materialization.
@@ -1931,7 +1944,7 @@
         return result;
     }
 
-    Node* resolve(BasicBlock* block, Node* node)
+    NEVER_INLINE Node* resolve(BasicBlock* block, Node* node)
     {
         // If we are currently pointing to a single local allocation,
         // simply return the associated materialization.
@@ -1945,7 +1958,7 @@
         return node;
     }
 
-    Node* getMaterialization(BasicBlock* block, Node* identifier)
+    NEVER_INLINE Node* getMaterialization(BasicBlock* block, Node* identifier)
     {
         ASSERT(m_heap.isAllocation(identifier));
         if (!m_sinkCandidates.contains(identifier))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to