On Tue, Apr 18, 2017 at 9:53 AM, Edward Welbourne <edward.welbou...@qt.io> wrote: > Jan Ziak (12 April 2017 20:07) >> Is this a make-4.2.1 bug, or a gcc-6.3.0 bug? The line numbers in the garbled >> error messages, in this case 79 and 84, are correct. > > Given its sensitivity to the specific flags passed to gcc, it's natural > to suppose it's a gcc bug. You can test by running gcc manually, > instead of via make; find the rule that's running gcc, remove @ from the > start of its line if present, run make to see the command it invokes; > invoke that command yourself. If the issue arises then, it's definitely > gcc. > > Eddy.
It isn't a gcc bug. Please fix it in make-4.2.1+ source code: ==22022== Memcheck, a memory error detector ==22022== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==22022== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==22022== Command: /usr/bin/_make -f /tmp/ccEUTdnj.mk -j4 all ==22022== f.o: In function `f': f.cc:3155: undefined reference to `tul::ff()' collect2: error: ld returned 1 exit status ==22022== Invalid read of size 1 ==22022== at 0x4A09EF2: strlen (vg_replace_strmem.c:454) ==22022== by 0x4135B6: child_error (job.c:497) ==22022== by 0x415577: reap_children (job.c:866) ==22022== by 0x421C6F: update_goal_chain (remake.c:112) ==22022== by 0x407E0B: main (main.c:2558) ==22022== Address 0x4caf710 is 0 bytes inside a block of size 200 free'd ==22022== at 0x4A0804B: free (vg_replace_malloc.c:534) ==22022== by 0x41EC52: read_all_makefiles (read.c:210) ==22022== by 0x4073BE: main (main.c:1969) ==22022== Block was alloc'd at ==22022== at 0x4A06E8F: malloc (vg_replace_malloc.c:306) ==22022== by 0x418334: xmalloc (misc.c:221) ==22022== by 0x40B5C7: initialize_variable_output (expand.c:84) ==22022== by 0x40BDA0: variable_expand_string (expand.c:203) ==22022== by 0x40C2A0: variable_expand (expand.c:417) ==22022== by 0x40C2A0: variable_expand_for_file (expand.c:464) ==22022== by 0x40C2D3: allocated_variable_expand_for_file (expand.c:564) ==22022== by 0x41EC04: read_all_makefiles (read.c:194) ==22022== by 0x4073BE: main (main.c:1969) ==22022== ==22022== Invalid read of size 1 ==22022== at 0x32B3446A64: vfprintf (vfprintf.c:1631) ==22022== by 0x32B34F7DD7: __vsprintf_chk (vsprintf_chk.c:85) ==22022== by 0x32B34F7D25: __sprintf_chk (sprintf_chk.c:31) ==22022== by 0x4135F0: sprintf (stdio2.h:33) ==22022== by 0x4135F0: child_error (job.c:498) ==22022== by 0x415577: reap_children (job.c:866) ==22022== by 0x421C6F: update_goal_chain (remake.c:112) ==22022== by 0x407E0B: main (main.c:2558) ==22022== Address 0x4caf710 is 0 bytes inside a block of size 200 free'd ==22022== at 0x4A0804B: free (vg_replace_malloc.c:534) ==22022== by 0x41EC52: read_all_makefiles (read.c:210) ==22022== by 0x4073BE: main (main.c:1969) ==22022== Block was alloc'd at ==22022== at 0x4A06E8F: malloc (vg_replace_malloc.c:306) ==22022== by 0x418334: xmalloc (misc.c:221) ==22022== by 0x40B5C7: initialize_variable_output (expand.c:84) ==22022== by 0x40BDA0: variable_expand_string (expand.c:203) ==22022== by 0x40C2A0: variable_expand (expand.c:417) ==22022== by 0x40C2A0: variable_expand_for_file (expand.c:464) ==22022== by 0x40C2D3: allocated_variable_expand_for_file (expand.c:564) ==22022== by 0x41EC04: read_all_makefiles (read.c:194) ==22022== by 0x4073BE: main (main.c:1969) _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make