WebKit Bugzilla
Attachment 360978 Details for
Bug 193291
: Leak of WTF::StringImpl under SymbolImpl::createNullSymbol() (48 bytes) in com.apple.WebKit.WebContent running layout tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v2
bug-193291-20190202064031.patch (text/plain), 1.73 KB, created by
David Kilzer (:ddkilzer)
on 2019-02-02 06:40:33 PST
(
hide
)
Description:
Patch v2
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-02-02 06:40:33 PST
Size:
1.73 KB
patch
obsolete
>Subversion Revision: 240893 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 59ded06994ae3f787052d44ef91aa60bfc4a14e8..e8b13de3337eafd8bad1e252fbf178b79f05c2e5 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-02 David Kilzer <ddkilzer@apple.com> >+ >+ Leak of WTF::StringImpl under SymbolImpl::createNullSymbol() (48 bytes) in com.apple.WebKit.WebContent running layout tests >+ <https://webkit.org/b/193291> >+ <rdar://problem/46655953> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/text/SymbolImpl.h: >+ (WTF::SymbolImpl::~SymbolImpl): Fix the leak by implementing the >+ class destructor that calls StringImpl::deref() on `m_owner`. >+ Two of the three constructors leak the StringImpl when setting >+ `m_owner`, so we need to balance that by manually calling >+ deref(). >+ > 2018-12-16 Darin Adler <darin@apple.com> > > Convert additional String::format clients to alternative approaches >diff --git a/Source/WTF/wtf/text/SymbolImpl.h b/Source/WTF/wtf/text/SymbolImpl.h >index 42ff036f7fd568395fa7808bde748c4353e8e3d1..e082e1e9c1fc5cec583250efb585bbb25faa29e4 100644 >--- a/Source/WTF/wtf/text/SymbolImpl.h >+++ b/Source/WTF/wtf/text/SymbolImpl.h >@@ -116,6 +116,13 @@ protected: > ASSERT(StringImpl::tailOffset<StringImpl*>() == OBJECT_OFFSETOF(SymbolImpl, m_owner)); > } > >+ ~SymbolImpl() >+ { >+ if (m_owner != StringImpl::empty()) >+ m_owner->deref(); >+ m_owner = nullptr; >+ } >+ > // The pointer to the owner string should be immediately following after the StringImpl layout, > // since we would like to align the layout of SymbolImpl to the one of BufferSubstring StringImpl. > StringImpl* m_owner;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193291
:
358722
|
358730
| 360978