Bug 139832 - Plug leak below LLVMCopyStringRepOfTargetData().
Summary: Plug leak below LLVMCopyStringRepOfTargetData().
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-19 13:05 PST by Andreas Kling
Modified: 2014-12-19 14:14 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2014-12-19 13:11 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.