fork error when trying to call VirtualAlloc with size==0
Yuyi Wang
Strawberry_Str@hotmail.com
Tue May 20 03:25:18 GMT 2025
Thank you for your reply. The DLL is a "proc macro" DLL for rustc, which means
that it's not designed to be changed after created. However, I've also found
that this stage-1 compiler doesn't always trigger this failure: it just trigger
fork failure with compiling relatively large projects. In this case, it fails
to compile rustc, which depends on 17 proc-macro DLLs. Previously it also failed
to compile another tool in rust repo, but sorry I forget which one it was.
An interesting phenomenon is that the stage-0 rustc is also a cygwin executable,
compiled 10 days before, and it doesn't trigger this failure. I haven't found
out that if this failure is caused by some misc changes in rustc...
I also tried again with Windows Defender disabled, but it still triggers the
failure with exact the same message.
Back to the code, I really think the most possible case is b) mb.BaseAddress !=
`here`. However, it means that we overestimated `size`, so `end` is less than
`dll_end`, and the dll is smaller than it used to be...? Is it possible that LoadLibraryExW() allocates smaller region than the image size?
--
Yuyi Wang
More information about the Cygwin
mailing list