Title: [234106] trunk/Source/_javascript_Core
- Revision
- 234106
- Author
- [email protected]
- Date
- 2018-07-23 12:32:42 -0700 (Mon, 23 Jul 2018)
Log Message
Add some asserts to help diagnose a crash.
https://bugs.webkit.org/show_bug.cgi?id=187915
<rdar://problem/42508166>
Reviewed by Michael Saboff.
Add some asserts to verify that an CodeBlock alternative should always have a
non-null jitCode. Also change a RELEASE_ASSERT_NOT_REACHED() in
CodeBlock::setOptimizationThresholdBasedOnCompilationResult() to a RELEASE_ASSERT()
so that we'll retain the state of the variables that failed the assertion (again
to help with diagnosis).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setAlternative):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (234105 => 234106)
--- trunk/Source/_javascript_Core/ChangeLog 2018-07-23 19:13:08 UTC (rev 234105)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-07-23 19:32:42 UTC (rev 234106)
@@ -1,3 +1,23 @@
+2018-07-23 Mark Lam <[email protected]>
+
+ Add some asserts to help diagnose a crash.
+ https://bugs.webkit.org/show_bug.cgi?id=187915
+ <rdar://problem/42508166>
+
+ Reviewed by Michael Saboff.
+
+ Add some asserts to verify that an CodeBlock alternative should always have a
+ non-null jitCode. Also change a RELEASE_ASSERT_NOT_REACHED() in
+ CodeBlock::setOptimizationThresholdBasedOnCompilationResult() to a RELEASE_ASSERT()
+ so that we'll retain the state of the variables that failed the assertion (again
+ to help with diagnosis).
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::setAlternative):
+ (JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
+ * dfg/DFGPlan.cpp:
+ (JSC::DFG::Plan::Plan):
+
2018-07-23 Filip Pizlo <[email protected]>
Unreviewed, fix no-JIT build.
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (234105 => 234106)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-07-23 19:13:08 UTC (rev 234105)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-07-23 19:32:42 UTC (rev 234106)
@@ -973,6 +973,8 @@
void CodeBlock::setAlternative(VM& vm, CodeBlock* alternative)
{
+ RELEASE_ASSERT(alternative);
+ RELEASE_ASSERT(alternative->jitCode());
m_alternative.set(vm, this, alternative);
}
@@ -2419,7 +2421,7 @@
JITCode::JITType type = jitType();
if (type != JITCode::BaselineJIT) {
dataLog(*this, ": expected to have baseline code but have ", type, "\n");
- RELEASE_ASSERT_NOT_REACHED();
+ CRASH_WITH_INFO(bitwise_cast<uintptr_t>(jitCode().get()), type);
}
CodeBlock* replacement = this->replacement();
Modified: trunk/Source/_javascript_Core/dfg/DFGPlan.cpp (234105 => 234106)
--- trunk/Source/_javascript_Core/dfg/DFGPlan.cpp 2018-07-23 19:13:08 UTC (rev 234105)
+++ trunk/Source/_javascript_Core/dfg/DFGPlan.cpp 2018-07-23 19:32:42 UTC (rev 234106)
@@ -148,6 +148,7 @@
, weakReferences(codeBlock)
, stage(Preparing)
{
+ RELEASE_ASSERT(codeBlock->alternative()->jitCode());
}
Plan::~Plan()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes