[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #45838] Memory corruption when recipe runs a batch file with spaces
From: |
anonymous |
Subject: |
[bug #45838] Memory corruption when recipe runs a batch file with spaces in path |
Date: |
Thu, 27 Aug 2015 16:07:06 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?45838>
Summary: Memory corruption when recipe runs a batch file with
spaces in path
Project: make
Submitted by: None
Submitted on: Thu 27 Aug 2015 16:07:05 UTC
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:
On 4.1, when trying to run a batch file from a recipe, and that batch file has
a space in its path, strange command line corruption appears. The problem did
not exist in 3.82.
I'm building make from sources on Windows with MSVC. I rebuilt in debug and
ran the code through a debugger.
It turns out that the problem is in file sub_proc.c, in function
process_begin, at line 725 (in 4.1 and current git head). The code wants to
free argv[0] and replace it with something else. However all strings in argv
are in a single memory block, so freeing argv[0] also frees subsequent argv[n]
strings, and the memory doesn't always hold the argument content until they
are used.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45838>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #45838] Memory corruption when recipe runs a batch file with spaces in path,
anonymous <=