Skip to content

process corruption on windows #394

@vtjnash

Description

@vtjnash

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions