<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - bmalloc::PerProcess<T> is not really per-process, can lead to mistakes / duplication (IsoTLSDeallocatorEntry<IsoConfig<40u>>)"
   href="https://bugs.webkit.org/show_bug.cgi?id=182496">182496</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>bmalloc::PerProcess<T> is not really per-process, can lead to mistakes / duplication (IsoTLSDeallocatorEntry<IsoConfig<40u>>)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>bmalloc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>joepeck@webkit.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>fpizlo@apple.com, ggaren@apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>bmalloc::PerProcess<T> is not really per-process, can lead to mistakes / duplication

The templated type doesn't export symbols, so each image (library / framework) that includes code with PerProcess<T> gets its own storage and its own instance.

The only existing duplication right now is PerProcess<IsoTLSDeallocatorEntry<IsoConfig<40u>>> gets one instance in JavaScriptCore and one in WebCore:

    JavaScriptCore`bmalloc::PerProcess<bmalloc::IsoTLSDeallocatorEntry<bmalloc::IsoConfig<40u>>>
    WebCore`bmalloc::PerProcess<bmalloc::IsoTLSDeallocatorEntry<bmalloc::IsoConfig<40u>>>

See also in <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Multiple bmalloc scavenger threads is unexpected"
   href="show_bug.cgi?id=182474">bug 182474</a> where PerProcess<Scavenger> created multiple instances (again 1 from JSC and WebCore). This case was noticed because the constructor spawns its own thread so the duplication was causing multiple bmalloc scavenger threads.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>