Hi,

I worked at narrowing down the segfault problem I am getting with both GNU Make 3.82 and 3.82.90. This is the smallest makefile I came up with:

.SECONDEXPANSION:
gen_default_Test_f := \
  file1 \
  file2
gen_default_Test_bar := bar_foo

gen_%.f: $${gen_$$*_f}
  @echo "f $@"

gen_%: \
  $$(if $$(gen_$$*_f),gen_%.f) \
  $$(if $$(gen_$$*_bar),$$(gen_$$*_bar).ext)
  @echo "$@"


The backtrace in gdb with version 3.82 is:

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x00949df0 in raise () from /lib/libc.so.6
#2  0x0094b701 in abort () from /lib/libc.so.6
#3  0x0098228b in __libc_message () from /lib/libc.so.6
#4  0x0098a5a5 in _int_free () from /lib/libc.so.6
#5  0x0098a9e9 in free () from /lib/libc.so.6
#6 0x08052a36 in pattern_search (file=0x807c518, archive=10891252, depth=1, recursions=0) at implicit.c:976 #7 0x08053f63 in try_implicit_rule (file=0x807c518, depth=1) at implicit.c:47
#8  0x0806117b in update_file (file=0x807c518, depth=0) at remake.c:493
#9  0x08061b54 in update_goal_chain (goals=0x807e548) at remake.c:157
#10 0x0805979c in main (argc=8, argv=0xffffd164, envp=0xffffd188) at main.c:2282

I compiled GNU Make with both 32-bit and 64-bit compile on RedHat 5.5 and they both have this problem. In 3.81, there is no segfault.

Could anyone shed light on this? I am a big fan of conditional prerequisites done with SECONDEXPANSION. I hope they will still work.

Thanks,
Martin


_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to