Bug 100437

Summary: SymbolTableIndexHashTraits::needsDestruction should be set to true
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Michael Saboff
Reported 2012-10-25 17:16:12 PDT
Due to the use of allocated rare data (FatEntry's) in SymbolTableEntry's, the hash trait needsDestruction should be set to true. The code is currently working due to the Key trait, HashTraits<RefPtr<StringImpl> > having needsDestruction set true. If the key or it's trait is set to false, then this would leak memory.
Attachments
Patch (1.47 KB, patch)
2012-10-25 17:32 PDT, Michael Saboff
no flags
Michael Saboff
Comment 1 2012-10-25 17:17:07 PDT
Michael Saboff
Comment 2 2012-10-25 17:32:34 PDT
Mark Hahnenberg
Comment 3 2012-10-25 17:36:17 PDT
Comment on attachment 170771 [details] Patch r=me
WebKit Review Bot
Comment 4 2012-10-25 20:28:45 PDT
Comment on attachment 170771 [details] Patch Clearing flags on attachment: 170771 Committed r132566: <http://trac.webkit.org/changeset/132566>
WebKit Review Bot
Comment 5 2012-10-25 20:28:48 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 6 2012-10-26 09:21:14 PDT
Comment on attachment 170771 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=170771&action=review > Source/JavaScriptCore/runtime/SymbolTable.h:340 > - static const bool needsDestruction = false; > + static const bool needsDestruction = true; A simpler correct fix is to simply remove this line entirely. It is true by default for structs, so no need to explicitly set it to true.
Note You need to log in before you can comment on or make changes to this bug.