[bug #65324] Fix crash in disable_builtins.

2024-05-06 Thread Paul D. Smith
Update of bug #65324 (group make):

  Status:None => Fixed  
 Open/Closed:Open => Closed 
Operating System:None => Any
   Fixed Release:None => SCM

___

Follow-up Comment #2:

Pushed, thank Dmitry!


___

Reply to this item at:

  

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




[bug #65324] Fix crash in disable_builtins.

2024-02-16 Thread Dmitry Goncharov
Additional Item Attachment, bug#65324 (group make):

File name: sv65324.diff   Size:1 KB



AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-f5e892eb0bd66f106ebc508b2a1f40d7763ca3f9.tar.gz


___

Reply to this item at:

  

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




[bug #65324] Fix crash in disable_builtins.

2024-02-16 Thread Dmitry Goncharov
Follow-up Comment #1, bug#65324 (group make):

Make crashes when -r and MAKEFLAGS= are specified on the command line.

On startup make begins to process command line arguments. During processing of
"MAKEFLAGS=" make calls reset_makeflags, which in turn calls disable_builtins,
which dereferences null suffix_file.



$ ls
makefile
$ cat makefile 
all:;
$ ~/src/gmake/make/m64/make -r MAKEFLAGS=
../src/main.c:3476:13: runtime error: member access within null pointer of
type 'struct file'
AddressSanitizer:DEADLYSIGNAL
=
==15066==ERROR: AddressSanitizer: SEGV on unknown address 0x0088 (pc
0x560ed1b164e0 bp 0x7ffd870f7ee0 sp 0x7ffd870f7ed0 T0)
==15066==The signal is caused by a READ memory access.
==15066==Hint: address points to the zero page.
#0 0x560ed1b164e0 in disable_builtins ../src/main.c:3476
#1 0x560ed1b10e95 in reset_makeflags ../src/main.c:3098
#2 0x560ed1b712a9 in set_special_var ../src/variable.c:1325
#3 0x560ed1b72e89 in do_variable_definition ../src/variable.c:1693
#4 0x560ed1b746a7 in try_variable_definition ../src/variable.c:1889
#5 0x560ed1b103df in handle_non_switch_argument ../src/main.c:3015
#6 0x560ed1b110c7 in decode_switches ../src/main.c:3144
#7 0x560ed1b052ef in main ../src/main.c:1615
#8 0x7f1abca29d8f in __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
#9 0x7f1abca29e3f in __libc_start_main_impl ../csu/libc-start.c:392
#10 0x560ed1a94654 in _start
(/home/dgoncharov/src/gmake/make/m64/make+0x14c654)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../src/main.c:3476 in disable_builtins
==15066==ABORTING
Aborted (core dumped)
$


This is a recent regression. Before a382ac6cd17eedf535407d29bcfc3cef04bbc3bc
this was not an issue, because MAKEFLAGS was not marked as special.


___

Reply to this item at:

  

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




[bug #65324] Fix crash in disable_builtins.

2024-02-16 Thread Dmitry Goncharov
URL:
  

 Summary: Fix crash in disable_builtins.
   Group: make
   Submitter: dgoncharov
   Submitted: Sat 17 Feb 2024 04:27:47 AM UTC
Severity: 3 - Normal
  Item Group: Bug
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: SCM
Operating System: None
   Fixed Release: None
   Triage Status: None


___

Follow-up Comments:


---
Date: Sat 17 Feb 2024 04:27:47 AM UTC By: Dmitry Goncharov 
.







___

Reply to this item at:

  

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