<?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>197092</bug_id>
          
          <creation_ts>2019-04-18 22:28:47 -0700</creation_ts>
          <short_desc>[bmalloc] Register PerProcess&apos;s memory as root for Darwin Leaks tool</short_desc>
          <delta_ts>2019-04-18 22:54:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>bmalloc</component>
          <version>WebKit Nightly Build</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="Yusuke Suzuki">ysuzuki</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>ggaren</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1528706</commentid>
    <comment_count>0</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-04-18 22:28:47 -0700</bug_when>
    <thetext>Recently, we see some false-positive memory leaks related to bmalloc::PerProcess. Currently I&apos;m ensuring my thought but it seems that this is because PerProcess&apos;s data is allocated with vmAllocate with tag. This means that this memory is not scanned by Leak tool.
And maybe, bmalloc::Zone is also accidentally broken since bmalloc::PerProcess now allocates memory from vmAllocate. bmalloc::Zone resides in vmAllocate-ed memory, so FixedVector in bmalloc::Zone is not considered as root.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1528707</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-04-18 22:29:31 -0700</bug_when>
    <thetext>&lt;rdar://problem/45854674&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1528708</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-04-18 22:54:23 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #0)
&gt; Recently, we see some false-positive memory leaks related to
&gt; bmalloc::PerProcess. Currently I&apos;m ensuring my thought but it seems that
&gt; this is because PerProcess&apos;s data is allocated with vmAllocate with tag.
&gt; This means that this memory is not scanned by Leak tool.
&gt; And maybe, bmalloc::Zone is also accidentally broken since
&gt; bmalloc::PerProcess now allocates memory from vmAllocate. bmalloc::Zone
&gt; resides in vmAllocate-ed memory, so FixedVector in bmalloc::Zone is not
&gt; considered as root.

I thought Zone is broken because of the comment of Zone, but maybe, it is not broken. I discussed with JoePeck about this. Leaks tool correctly scans bmalloc&apos;s heap as malloc-ed heap by using malloc-zone enumerate API. So maybe, situation is changed from https://trac.webkit.org/changeset/180359/webkit.

So it seems that this issue is already fixed by the tool side. After ensuring this, I&apos;ll change this CONFIGURATION CHANGED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>