Recently I'm trying to build rustc on Cygwin (actually MSYS2). Here is the 
error:

      0 [main] rustc 3299 child_info_fork::abort: couldn't allocate memory 
0x1FD100000(0) for 
'\??\D:\Straw\Documents\Git\rust\build\x86_64-pc-cygwin\stage1-rustc\release\deps\zerovec_derive-4b870d338ef8cbdd.dll'
 alignment, Win32 error 87
      0 [main] rustc 3299 child_info_fork::abort: couldn't allocate memory 
0x1FD100000(0) for 
'\??\D:\Straw\Documents\Git\rust\build\x86_64-pc-cygwin\stage1-rustc\release\deps\zerovec_derive-4b870d338ef8cbdd.dll'
 alignment, Win32 error 87
error: could not exec the linker `x86_64-pc-msys-gcc`

Seems that reserve_at() in file cygwin/winsup/cygwin/dll_init.cc is trying to 
call
VirtualAlloc() with size == 0. That's why it returns 87 
(ERROR_INVALID_PARAMETER).
This error is rare and I'm not able to create an MWE now.

I looked into the source code in dll_init.cc and confirmed that size is possible
to be zero. I guess that end == dll_end in this case. (here != dll_base because 
of
the conditions in callee.) So the dll straddles our left edge. Is this a bug of
the code?

Sincerely,
Yuyi Wang

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to