$ sw_vers ProductName: macOS ProductVersion: 12.6 BuildVersion: 21G115 $ ./make -v GNU Make 4.3.90 Built for x86_64-apple-darwin21.6.0 Copyright (C) 1988-2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later < https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
$ cat Makefile $(info $(wildcard foo)) $ rm -f foo $ ./make zsh: segmentation fault ./make $ touch foo $ ./make zsh: segmentation fault ./make $ sudo gdb ./make GNU gdb (GDB) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html > This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-apple-darwin21.5.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./make... (gdb) run Starting program: /Users/jgc/Downloads/gmsl-1.1.9/make [New Thread 0x2603 of process 65226] [New Thread 0x2403 of process 65226] warning: unhandled dyld version (17) Thread 2 received signal SIGSEGV, Segmentation fault. 0x000000010001e7fe in parse_file_seq (stringp=<optimized out>, stringp@entry=0x7ff7bfefe868, size=size@entry=16, stopmap=stopmap@entry=1, prefix=prefix@entry=0x0, flags=flags@entry=25) at src/read.c:3529 3529 NEWELT (concat (2, prefix, nlist[i])); (gdb) bt #0 0x000000010001e7fe in parse_file_seq (stringp=<optimized out>, stringp@entry=0x7ff7bfefe868, size=size@entry=16, stopmap=stopmap@entry=1, prefix=prefix@entry=0x0, flags=flags@entry=25) at src/read.c:3529 #1 0x000000010000c156 in string_glob (line=0x600003900340 "foo") at src/function.c:365 #2 func_wildcard (o=0x0, argv=<optimized out>, funcname=<optimized out>) at src/function.c:1535 #3 0x000000010000ab0f in handle_function (op=0x1, op@entry=0x7ff7bfefe998, stringp=<optimized out>, stringp@entry=0x7ff7bfefe990) at src/function.c:2669 #4 0x0000000100006def in variable_expand_string (line=<optimized out>, line@entry=0x0, string=<optimized out>, string@entry=0x7ff7bfefe7b8 "", length=<optimized out>, length@entry=18446744073709551615) at src/expand.c:282 #5 0x00000001000072bb in variable_expand (line=0x7ff7bfefe7b8 "") at src/expand.c:441 #6 variable_expand_for_file (line=0x7ff7bfefe7b8 "", file=0x0) at src/expand.c:488 #7 allocated_variable_expand_for_file (line=0x7ff7bfefe7b8 "", file=0x0) at src/expand.c:590 #8 expand_argument (str=<optimized out>, end=end@entry=0x1 <error: Cannot access memory at address 0x1>) at src/expand.c:470 #9 0x000000010000aa5e in handle_function (op=op@entry=0x7ff7bfefeb48, stringp=<optimized out>, stringp@entry=0x7ff7bfefeb40) at src/function.c:2638 #10 0x0000000100006def in variable_expand_string (line=<optimized out>, string=<optimized out>, length=<optimized out>) at src/expand.c:282 #11 0x000000010001cb62 in eval (ebuf=<optimized out>, ebuf@entry=0x7ff7bfefed98, set_default=1, set_default@entry=-1074796616) at src/read.c:1067 #12 0x000000010001ba93 in eval_makefile (filename=<optimized out>, flags=<optimized out>, flags@entry=0) at src/read.c:439 #13 0x000000010001b645 in read_all_makefiles (makefiles=<optimized out>) at src/read.c:261 #14 0x0000000100016b18 in main (argc=1, argv=0x7ff7bfeffc30, envp=0x7ff7ffffffff) at src/main.c:2047