Bug 139832

Summary: Plug leak below LLVMCopyStringRepOfTargetData().
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, msaboff
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2014-12-19 13:05:33 PST
Plug leak below LLVMCopyStringRepOfTargetData().
Comment 1 Andreas Kling 2014-12-19 13:11:36 PST
Created attachment 243571 [details]
Patch
Comment 2 Michael Saboff 2014-12-19 13:33:35 PST
Comment on attachment 243571 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=243571&action=review

r=me

> Source/JavaScriptCore/ftl/FTLCompile.cpp:648
> +        llvm->SetDataLayout(state.module, stringRepOfTargetData);

Does SetDataLayout need the string after it returns or does it copy out its contents?
Comment 3 Andreas Kling 2014-12-19 13:37:47 PST
(In reply to comment #2)
> Comment on attachment 243571 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=243571&action=review
> 
> r=me

You forgot to tick r+ :-)

> > Source/JavaScriptCore/ftl/FTLCompile.cpp:648
> > +        llvm->SetDataLayout(state.module, stringRepOfTargetData);
> 
> Does SetDataLayout need the string after it returns or does it copy out its
> contents?

It assigns it to an std::string internally, making a copy.
Comment 4 WebKit Commit Bot 2014-12-19 14:14:25 PST
Comment on attachment 243571 [details]
Patch

Clearing flags on attachment: 243571

Committed r177597: <http://trac.webkit.org/changeset/177597>
Comment 5 WebKit Commit Bot 2014-12-19 14:14:29 PST
All reviewed patches have been landed.  Closing bug.