<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>180319</bug_id>
          
          <creation_ts>2017-12-02 15:36:09 -0800</creation_ts>
          <short_desc>Wasm::ModuleInformation leaks</short_desc>
          <delta_ts>2017-12-18 14:57:20 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebAssembly</component>
          <version>Safari 9</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jfbastien</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1377378</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-12-02 15:36:09 -0800</bug_when>
    <thetext>I&apos;m getting a reproducible leak on WebKit regression tests.

run-webkit-tests -1 --leaks --no-retry --no-build --no-show --no-sample --debug-rwt-logging http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe.html --repeat 10

JSC::webAssemblyValidateFunc(JSC::ExecState*) WebAssemblyPrototype.cpp:227 |
JSC::Wasm::BBQPlan::BBQPlan(JSC::Wasm::Context*, unsigned char const*, unsigned long, JSC::Wasm::BBQPlan::AsyncWork, WTF::RefPtr&lt;WTF::SharedTask&lt;void (JSC::Wasm::Plan&amp;)&gt; &gt;&amp;&amp;) WasmBBQPlan.cpp:72 |
JSC::Wasm::BBQPlan::BBQPlan(JSC::Wasm::Context*, unsigned char const*, unsigned long, JSC::Wasm::BBQPlan::AsyncWork, WTF::RefPtr&lt;WTF::SharedTask&lt;void (JSC::Wasm::Plan&amp;)&gt; &gt;&amp;&amp;) WasmBBQPlan.cpp:68 |
JSC::Wasm::Plan::Plan(JSC::Wasm::Context*, unsigned char const*, unsigned long, WTF::RefPtr&lt;WTF::SharedTask&lt;void (JSC::Wasm::Plan&amp;)&gt; &gt;&amp;&amp;) WasmPlan.cpp:68 | JSC::Wasm::ModuleInformation::ModuleInformation(WTF::Vector&lt;unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;&amp;) WasmModuleInformation.cpp:39 |
JSC::Wasm::ModuleInformation::ModuleInformation(WTF::Vector&lt;unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;&amp;) WasmModuleInformation.cpp:37 |
WTF::ThreadSafeRefCountedBase::operator new(unsigned long) ThreadSafeRefCounted.h:36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1377379</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-12-02 15:36:29 -0800</bug_when>
    <thetext>&lt;rdar://problem/35816264&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1377783</commentid>
    <comment_count>2</comment_count>
    <who name="JF Bastien">jfbastien</who>
    <bug_when>2017-12-04 11:11:39 -0800</bug_when>
    <thetext>Interesting, will look into it. I know the GC was retaining WebAssembly modules a bit ago (which themselves retain WasmModuleInformation), I wonder if that&apos;s the problem or if we don&apos;t ref properly. If it&apos;s the former then we have to figure out where we&apos;re missing a stack cleanup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1382918</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-12-18 14:57:20 -0800</bug_when>
    <thetext>This is an actual leak (memory without any pointers to it).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>