• Pauli Virtanen's avatar
    pyximport: fix a bug crashing other processes · e2f2580a
    Pauli Virtanen authored
    pyxbuild overwrites .so file contents, corrupting any mmapped code image
    loaded. If pyximporting the same module from two different processes, on
    Linux this leads to crashes with bus error.
    
    This commit fixes the issue by unlinking the file first. On Linux et
    al., this does not change the file contents of any open FDs.  On
    Windows, unlinking fails, and we just switch to using a different file
    name.
    e2f2580a
pyxbuild.py 5.66 KB