URL: <http://savannah.gnu.org/bugs/?43887>
Summary: shell function blocks for x64 builds with MSVC compiler 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 _______________________________________________________ Details: 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 int! 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 attached. 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! Thanks! _______________________________________________________ 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: cboos fix for this issue, on top of 4.1 <http://savannah.gnu.org/bugs/download.php?file_id=32711> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?43887> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make