[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SECONDEXPANSION segmentation fault with make 3.82.90
From: |
Paul Smith |
Subject: |
Re: SECONDEXPANSION segmentation fault with make 3.82.90 |
Date: |
Tue, 09 Jul 2013 14:37:35 -0400 |
Every segmentation fault is by definition a bug...
Thanks for the repro case! I'll try to look into this when I get home
tonight.
On Tue, 2013-07-09 at 14:20 -0400, Martin d'Anjou wrote:
> Hello,
>
> I have found a segmentation fault executing make. This makefile makes
> little sense, but it reproduces the segfault:
>
> .SECONDEXPANSION:
> sim_base_rgg := just_a_name
> sim_base_src := a
> sim_base_f := a a a
>
> sim_%.f: $${sim_$$*_f}
> echo $@
>
> sim_%.src: $${sim_$$*_src}
> echo $@
>
> sim_%: \
> $$(if $$(sim_$$*_src),sim_%.src) \
> $$(if $$(sim_$$*_f),sim_%.f) \
> $$(if $$(sim_$$*_rgg),$$(sim_$$*_rgg).s)
> echo $@
>
> To reproduce:
> $ touch a
> $ make sim_base
> *** glibc detected *** /home/martin/Downloads/make/make: free(): invalid
> pointer: 0x000000000092a540 ***
>
> The backtrace in gdb looks like this:
> #0 0x00007ffff7645425 in __GI_raise (sig=<optimized out>) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1 0x00007ffff7648b8b in __GI_abort () at abort.c:91
> #2 0x00007ffff768339e in __libc_message (do_abort=2, fmt=0x7ffff778d008
> "*** glibc detected *** %s: %s: 0x%s ***\n")
> at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
> #3 0x00007ffff768db96 in malloc_printerr (action=3, str=0x7ffff7789913
> "free(): invalid pointer", ptr=<optimized out>)
> at malloc.c:5018
> #4 0x0000000000411457 in pattern_search (file=<optimized out>,
> archive=<optimized out>, depth=1, recursions=0)
> at implicit.c:974
> #5 0x000000000041229f in try_implicit_rule (file=0x656af0, depth=1) at
> implicit.c:45
> #6 0x000000000041f98b in update_file_1 (depth=<optimized out>,
> file=0x656af0) at remake.c:491
> #7 update_file (file=0x656af0, depth=0) at remake.c:315
> #8 0x000000000041ff77 in update_goal_chain (goals=0x6624b0) at remake.c:155
> #9 0x0000000000407334 in main (argc=4, argv=0x7fffffffea68,
> envp=<optimized out>) at main.c:2516