Title: [253298] trunk/Source/_javascript_Core
- Revision
- 253298
- Author
- [email protected]
- Date
- 2019-12-09 12:51:27 -0800 (Mon, 09 Dec 2019)
Log Message
GetByIdVariant::dumpInContext() should not ref UniqueStringImpls.
https://bugs.webkit.org/show_bug.cgi?id=205023
<rdar://problem/57747265>
Reviewed by Saam Barati.
This is because GetByIdVariant::dumpInContext() may be called from the compiler
thread. GetByIdVariant::dumpInContext() inadvertently invoking the String copy
constructor on an Identifier, which in turn, refs the underlying UniqueStringImpl.
This results in a race against the mutator to adjust the refCount.
The fix is to have GetByIdVariant::dumpInContext() print the underlying
StringImpl instead of the Identifier itself.
* bytecode/GetByIdVariant.cpp:
(JSC::GetByIdVariant::dumpInContext const):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (253297 => 253298)
--- trunk/Source/_javascript_Core/ChangeLog 2019-12-09 20:05:18 UTC (rev 253297)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-12-09 20:51:27 UTC (rev 253298)
@@ -1,3 +1,22 @@
+2019-12-09 Mark Lam <[email protected]>
+
+ GetByIdVariant::dumpInContext() should not ref UniqueStringImpls.
+ https://bugs.webkit.org/show_bug.cgi?id=205023
+ <rdar://problem/57747265>
+
+ Reviewed by Saam Barati.
+
+ This is because GetByIdVariant::dumpInContext() may be called from the compiler
+ thread. GetByIdVariant::dumpInContext() inadvertently invoking the String copy
+ constructor on an Identifier, which in turn, refs the underlying UniqueStringImpl.
+ This results in a race against the mutator to adjust the refCount.
+
+ The fix is to have GetByIdVariant::dumpInContext() print the underlying
+ StringImpl instead of the Identifier itself.
+
+ * bytecode/GetByIdVariant.cpp:
+ (JSC::GetByIdVariant::dumpInContext const):
+
2019-12-08 Yousuke Kimoto <[email protected]>
[WinCairo] Refine initialization and error handling in RemoteInspectorSocket
Modified: trunk/Source/_javascript_Core/bytecode/GetByIdVariant.cpp (253297 => 253298)
--- trunk/Source/_javascript_Core/bytecode/GetByIdVariant.cpp 2019-12-09 20:05:18 UTC (rev 253297)
+++ trunk/Source/_javascript_Core/bytecode/GetByIdVariant.cpp 2019-12-09 20:51:27 UTC (rev 253298)
@@ -182,7 +182,7 @@
void GetByIdVariant::dumpInContext(PrintStream& out, DumpContext* context) const
{
out.print("<");
- out.print("id='", m_identifier ? *m_identifier : Identifier(), "', ");
+ out.print("id='", m_identifier ? m_identifier->impl() : StringImpl::empty(), "', ");
if (!isSet()) {
out.print("empty>");
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes