Skip to main content


In today's #Firefox bugs that require some thought. getenv() / setenv() aren't thread-safe but a bunch of libraries use them anyway. Boom.

We have to fix that but we can't change the libraries. How do we do it? By abusing the linking order and slotting our own thread-safe getenv() before libc's one.

So far so good.

Except that on older versions of Android we use our own linker to work around issues in the system one. And our linker wants to call getenv() too. Boom again.