bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #59093] Segmentation fault regression in make 4.3 vs. 4.2.1


From: Thomas Petazzoni
Subject: [bug #59093] Segmentation fault regression in make 4.3 vs. 4.2.1
Date: Thu, 10 Sep 2020 11:35:15 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

URL:
  <https://savannah.gnu.org/bugs/?59093>

                 Summary: Segmentation fault regression in make 4.3 vs. 4.2.1
                 Project: make
            Submitted by: tpetazzoni
            Submitted on: Thu 10 Sep 2020 03:35:12 PM UTC
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: None
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

GNU Make has a segmentation fault regression in make 4.3, where the exact same
make code works fine with make 4.2.1.

The stack trace looks like this:

Program received signal SIGSEGV, Segmentation fault.
0x000055e0fca8530d in func_filter_filterout (o=0x55e10693b400 "",
argv=<optimized out>, funcname=<optimized out>)
    at ../../src/function.c:1014
1014    ../../src/function.c: No such file or directory.
(gdb) 
(gdb) bt
#0  0x000055e0fca8530d in func_filter_filterout (o=0x55e10693b400 "",
argv=<optimized out>, funcname=<optimized out>)
    at ../../src/function.c:1014
#1  0x000055e0fca86261 in handle_function (op=op@entry=0x7fff1e9c2e70,
stringp=stringp@entry=0x7fff1e9c2e68)
    at ../../src/function.c:2544
#2  0x000055e0fca7fe2f in variable_expand_string (line=<optimized out>,
line@entry=0x0, string=<optimized out>, 
    length=length@entry=18446744073709551615) at ../../src/expand.c:258
#3  0x000055e0fca7fc16 in variable_expand (line=<optimized out>) at
../../src/expand.c:566
#4  variable_expand_for_file (file=0x0, line=<optimized out>) at
../../src/expand.c:464
#5  variable_expand_for_file (file=0x0, line=<optimized out>) at
../../src/expand.c:457
#6  allocated_variable_expand_for_file (file=0x0, line=<optimized out>) at
../../src/expand.c:566
#7  expand_argument (str=0x55e106978b98 "$(filter $(VARS),$(.VARIABLES)))",
end=end@entry=0x55e106978bb7 ")")
    at ../../src/expand.c:446
#8  0x000055e0fca8639c in handle_function (op=op@entry=0x7fff1e9c3040,
stringp=stringp@entry=0x7fff1e9c3038)
    at ../../src/function.c:2512
#9  0x000055e0fca7fe2f in variable_expand_string (line=<optimized out>,
line@entry=0x0, 
    string=string@entry=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))", 
    length=length@entry=18446744073709551615) at ../../src/expand.c:258
#10 0x000055e0fca7fc7a in variable_expand (line=0x55e1069cfbb2 " $(sort
$(filter $(VARS),$(.VARIABLES)))")
    at ../../src/expand.c:566
#11 variable_expand_for_file (file=0x0, line=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))")
    at ../../src/expand.c:464
#12 variable_expand_for_file (file=0x0, line=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))")
    at ../../src/expand.c:457
#13 allocated_variable_expand_for_file (file=0x0, line=0x55e1069cfbb2 " $(sort
$(filter $(VARS),$(.VARIABLES)))")
    at ../../src/expand.c:566
#14 expand_argument (str=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))", end=end@entry=0x0)
    at ../../src/expand.c:436
#15 0x000055e0fca83fb1 in func_foreach (o=0x55e10693a830 "",
argv=0x7fff1e9c3150, funcname=<optimized out>)
    at ../../src/function.c:868
#16 0x000055e0fca86261 in handle_function (op=op@entry=0x7fff1e9c32c0,
stringp=stringp@entry=0x7fff1e9c32b8)
    at ../../src/function.c:2544
#17 0x000055e0fca7fe2f in variable_expand_string (line=<optimized out>,
line@entry=0x0, string=<optimized out>, 
    length=length@entry=18446744073709551615) at ../../src/expand.c:258
#18 0x000055e0fca80792 in variable_expand (line=<optimized out>) at
../../src/expand.c:475
#19 variable_expand_for_file (line=<optimized out>, file=<optimized out>) at
../../src/expand.c:475
#20 0x000055e0fca807f4 in allocated_variable_expand_for_file (line=<optimized
out>, file=file@entry=0x55e0fe9d4280)
    at ../../src/expand.c:566
#21 0x000055e0fca8bc75 in new_job (file=0x55e0fe9d4280) at
../../src/job.c:1808
#22 0x000055e0fca9746c in remake_file (file=0x55e0fe9d4280) at
../../src/remake.c:1234
#23 update_file_1 (depth=<optimized out>, file=0x55e0fe9d4280) at
../../src/remake.c:835
#24 update_file (file=file@entry=0x55e0fe9d4280, depth=<optimized out>) at
../../src/remake.c:336
#25 0x000055e0fca97dc4 in update_goal_chain (goaldeps=<optimized out>) at
../../src/remake.c:151
#26 0x000055e0fca7bf25 in main (argc=<optimized out>, argv=<optimized out>,
envp=<optimized out>)
    at ../../src/main.c:2589

To reproduce:

$ git clone https://github.com/buildroot/buildroot.git
$ cd buildroot
$ make BR2_HAVE_DOT_CONFIG=y -s printvars VARS=%_LICENSE

Works with make 4.2.1 (and produces the expected output), segfaults with make
4.3 (with the above stack trace captured using gdb).




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59093>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]