-
Notifications
You must be signed in to change notification settings - Fork 1.6k
process corruption on windows #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
On 22.06.2014 05:42, Jameson Nash wrote:
I tried the proposed openblas-dllinit-safe.patch with BLAS-Tester on Best Regards |
the patch defers initialization for the user to call |
I found the real issue was due to a leaked process handle, which was also being used to disable all process permissions. I have updated the gist above to correct that issue. After changing the call to getenv to GetEnvironmentVariable it should be safe to move this back into DllInit. |
calling almost any external functions from
DllInit
orCONSTRUCTOR
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 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
getenv
may be the only call that touches the windows API ingotoblas_init
, so a possible alternative is to useGetEnvironmentVariable
instead ofgetenv
, although this option has not yet been tested. any uses ofmalloc
also must be avoided (althoughVirtualAlloc
should be safe)The text was updated successfully, but these errors were encountered: