calling almost any external functions from DllInit or CONSTRUCTOR can lead to corruption of the libc state on windows. this manifested itself as a very odd bug on some machines where child processes are unable to initialize the networking stack
ref. JuliaLang/julia#5574
ref. http://msdn.microsoft.com/en-us/library/windows/desktop/dn633971(v=vs.85).aspx
proposed patch file: https://github.com/JuliaLang/julia/blob/master/deps/openblas-dllinit-safe.patch
alternatively, it appears that getenv may be the only call that touches the windows API in gotoblas_init, so a possible alternative is to use GetEnvironmentVariable instead of getenv, although this option has not yet been tested. any uses of malloc also must be avoided (although VirtualAlloc should be safe)
calling almost any external functions from
DllInitorCONSTRUCTORcan lead to corruption of the libc state on windows. this manifested itself as a very odd bug on some machines where child processes are unable to initialize the networking stackref. JuliaLang/julia#5574
ref. http://msdn.microsoft.com/en-us/library/windows/desktop/dn633971(v=vs.85).aspx
proposed patch file: https://github.com/JuliaLang/julia/blob/master/deps/openblas-dllinit-safe.patch
alternatively, it appears that
getenvmay be the only call that touches the windows API ingotoblas_init, so a possible alternative is to useGetEnvironmentVariableinstead ofgetenv, although this option has not yet been tested. any uses ofmallocalso must be avoided (althoughVirtualAllocshould be safe)