<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebKit2 crashes when initializing due to not-threadsafe call to _NSGetEnviron()"
   href="https://bugs.webkit.org/show_bug.cgi?id=230206#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebKit2 crashes when initializing due to not-threadsafe call to _NSGetEnviron()"
   href="https://bugs.webkit.org/show_bug.cgi?id=230206">bug 230206</a>
              from <span class="vcard"><a class="email" href="mailto:kkinnunen@apple.com" title="Kimmo Kinnunen <kkinnunen@apple.com>"> <span class="fn">Kimmo Kinnunen</span></a>
</span></b>
        <pre>(In reply to white from <a href="show_bug.cgi?id=230206#c2">comment #2</a>)
<span class="quote">> (In reply to Kimmo Kinnunen from <a href="show_bug.cgi?id=230206#c1">comment #1</a>)
> > I think modifying environment is inherently single-threaded operation.
> > Is there a place in WebKit which modifies the environment in such a way that
> > causes WebKit to crash in this location during initialisation?

> AFAIK there isn't. 

> This crashing is due to some third party code naively called putenv() in
> non-main threads and caused racing condition issues while WebKit2 was
> initializing itself in main thread.</span >

So spelled out what Alexey mentioned:
There are two options:
A) Third-party code modifies the environment in single-threaded manner
or
B) WebKit should never use the environment

I believe this option is impossible to get correct:
C) Third-party code modifies the environment in random threads at random points in time, WebKit uses the environment


I think B would be a progression in many ways, one of which would be the bug you mention, but this is just an opinion. However, there is a lot of environment use in WebKit, so it might not be such an easy task for what it accomplishes. Also, other components could use the environment.

This particular crash is a bit odd since intuitively the client process should not use JSC, and hence should not crash here. However, there is still the issue of other locations using the environment.</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>