[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61409] The code used to create sub-processes on Windows triggers t

From: Liviu Ionescu
Subject: [bug #61409] The code used to create sub-processes on Windows triggers the spawnve() issue
Date: Mon, 1 Nov 2021 05:13:11 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15


                 Summary: The code used to create sub-processes on Windows
triggers the spawnve() issue
                 Project: make
            Submitted by: ilg
            Submitted on: Mon 01 Nov 2021 11:13:09 AM EET
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.3
        Operating System: MS Windows
           Fixed Release: None
           Triage Status: None



Although I cannot tag this report as a direct bug in make, it is a major
contributing factor.

It seems that the implementation of 'spawnve()' in the modern Microsoft UCRT
API has a problem, and in certain conditions, calling the 'spawn*e()'
functions with a non-NULL environment, crashes with Error -1073741819 which is

Unfortunately these conditions are met by GNU make, and some programs invoked
by 'make.exe' that try to create sub-processes with 'spawn*e()', fail.

Since 'spawnve()' is also called by BusyBox in its 'sh.exe' implementation,
this is a major issue, because it affects most common build tools.

I documented this issue in a separate project:

- https://github.com/xpack-dev-tools/ms-spawn-issue

Since ideally make should be able to start any sub-processes, including those
who use the unreliable 'spawnve()', it would be useful to review the Windows
specific code and try to avoid this problem.

A good source of inspiration might be Ninja Build code, which does not trigger
the condition that affects 'spawnve()' calls.

My knowledge of Windows is not good enough to provide a patch myself, but I
did my best to diagnose this issue, and I offer my help for further testing.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]