[Top][All Lists]

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

[bug #43887] shell function blocks for x64 builds with MSVC compiler

From: Christian Boos
Subject: [bug #43887] shell function blocks for x64 builds with MSVC compiler
Date: Thu, 25 Dec 2014 17:55:12 +0000
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36


                 Summary: shell function blocks for x64 builds with MSVC
                 Project: make
            Submitted by: cboos
            Submitted on: Thu 25 Dec 2014 05:55:11 PM GMT
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.1
        Operating System: MS Windows
           Fixed Release: None
           Triage Status: None



Season's greetings!

I've recently built Make 4.1 using Visual Studio 2012, for the x64 platform
(i.e. a 64-bits build).
The build went well, but using this make.exe for my usual build hanged.
Debugging it, I saw that the hang happened in a $(shell ...) function call,
never returning and stuck in reap_children().

I figured out that the "pid == shell_function_pid" comparison that needs to
succeed for setting the shell_function_completed flag and exiting
reap_children() could actually never succeed:
 - "pid" is obtained from process_wait_for_any() and is actually a pointer,
cast from sub_process* to HANDLE to pid_t
 - "shell_function_pid" got its value from process_init_fd() via
windows32_openpipe(), but here the cast chain is sub_process* to HANDLE to
For that specific compiler/platform combination, pointers and pid_t are
64-bits values, while ints are 32-bits values 

Using pid_t when declaring shell_function_pid fixed the problem. Patch

I've looked for other potential problems in the code, but all the other
int/pid_t mismatches seem to happen for platforms where it shouldn't be a
problem (EMX, Amiga).

Nearly forgot to say: everything else seems to work like a charm after that!


File Attachments:

Date: Thu 25 Dec 2014 05:55:11 PM GMT  Name:
0001-Use-correct-pid_t-type-for-shell_function_pid.patch  Size: 1kB   By:
fix for this issue, on top of 4.1


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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