Follow-up Comment #9, bug #40159 (project make): I repeated all my tests with both makefiles. In all tests, they behaved like the original. So this is a bug that's been fixed here since 3.82. Debian has taken many patches from here but hasn't taken whichever one fixed this. Can we say which it is? Here's one of the valgrind plaints:
==23456== Invalid read of size 1 ==23456== at 0x4C25FF8: memcpy (mc_replace_strmem.c:497) ==23456== by 0x4058A1: variable_buffer_output (expand.c:72) ==23456== by 0x405A15: variable_expand_string (expand.c:234) ==23456== by 0x40610A: allocated_variable_expand_for_file (expand.c:574) ==23456== by 0x4061EF: recursively_expand_for_file (expand.c:142) ==23456== by 0x405EC8: variable_expand_string (expand.c:176) ==23456== by 0x40610A: allocated_variable_expand_for_file (expand.c:574) ==23456== by 0x4063AA: expand_argument (expand.c:458) ==23456== by 0x40A8F2: handle_function (function.c:2241) ==23456== by 0x405AAA: variable_expand_string (expand.c:263) ==23456== by 0x40610A: allocated_variable_expand_for_file (expand.c:574) ==23456== by 0x4061EF: recursively_expand_for_file (expand.c:142) ==23456== Address 0x55dede0 is 16 bytes inside a block of size 17 free'd ==23456== at 0x4C240FD: free (vg_replace_malloc.c:366) ==23456== by 0x41CE84: define_variable_in_set (variable.c:228) ==23456== by 0x41D26F: do_variable_definition (variable.c:1334) ==23456== by 0x41D4AA: try_variable_definition (variable.c:1521) ==23456== by 0x416085: eval (read.c:722) ==23456== by 0x417407: eval_buffer (read.c:459) ==23456== by 0x4081D9: func_eval (function.c:1374) ==23456== by 0x40A92D: handle_function (function.c:2273) ==23456== by 0x405AAA: variable_expand_string (expand.c:263) ==23456== by 0x40610A: allocated_variable_expand_for_file (expand.c:574) ==23456== by 0x4061EF: recursively_expand_for_file (expand.c:142) ==23456== by 0x405EC8: variable_expand_string (expand.c:176) It's https://savannah.gnu.org/patch/?7534. https://savannah.gnu.org/patch/download.php?file_id=23309 applies cleanly to Debian Squeeze's make source and makes the problem go away. Well, it makes my valgrind symptom go away. I bet the cause is the same for the OP's problem. OP should try something like this: apt-get source make cd make-dfsg-3.81 dpkg-buildpackage -nc ./make -f .../premature-Makefile -R -r # check you still have the problem wget -O - https://savannah.gnu.org/patch/download.php?file_id=23309 | patch -p1 make ./make -f .../premature-Makefile -R -r # check you don't If it fixes your symptom too, then I recommend you raise a Debian bug citing this one. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?40159> _______________________________________________ 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