URL: <http://savannah.gnu.org/bugs/?36925>
Summary: Memory corruption or use after free Project: make Submitted by: None Submitted on: Mon 23 Jul 2012 18:14:40 UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: CVS Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: I'm seeing memory problems in GNU Make CVS, and I think the 3.82 release is also affected. I tested the CVS version with Valgrind (using Ubuntu 12.04 as the host OS), and managed to create a couple of small makefiles to demonstrate the problem. The path of the current directory is significant to the problem. To reproduce the problem the attached bug.tar.gz archive needs to be extracted to: /local/gnumake_test/1234567890123456789012345678901234567890 This will create a subdirectory called "bug". In there you will find a couple of makefiles, "Makefile" and "foo/bar/barf/barf.mak". There is also a log "valgrind.txt" of the results I get from Valgrind. To see the problem, change into the "bug" directory and execute the following command (where cvsmake is the make executable): env -i valgrind --malloc-fill=0x54 --free-fill=0x55 --tool=memcheck cvsmake -Rr The problem shows itself with this error from GNU Make: make: *** No rule to make target 'UUUUUU...', needed by 'foo/bar/barf/barf.i'. Stop. The UUUUUU... target is not mentioned in any makefile and is a result of GNU Make accessing freed memory (from --free-fill=0x55 valgrind option). If instead you tell GNU Make to build /dev/null: env -i valgrind --malloc-fill=0x54 --free-fill=0x55 --tool=memcheck cvsmake -Rr /dev/null the GNU Make error is not reported because there is no attempt to built the barf.i target, however Valgrind still shows something is going wrong with memory handling. If the path to the current directory is reduced in length or the paths mentioned in the makefiles are changed then the problem seems to go away. I hope you're able to reproduce what I'm seeing. regards, Rob. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mon 23 Jul 2012 18:14:40 UTC Name: bug.tar.gz Size: 1kB By: None <http://savannah.gnu.org/bugs/download.php?file_id=26248> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?36925> _______________________________________________ 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