C stdlib isn’t threadsafe and even safe Rust didn’t save us | EdgeDB Blog
Threads, TLS, a C stdlib race, and Rust: how EdgeDB hit a hidden landmine.
Hasnain says:
“The Real Culprit: setenv and getenv
setenv is not a safe function to call in a multithreaded environment. This is often a problem, and occasionally rediscovered as developers like us hit weird crashes in libc’s getenv [9], [10], [11], [12].”
Posted on 2025-01-25T21:10:27+0000