🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Jonas Olsson Mon, 20 Feb 1989 13:11
Argument decoding bug in gnu make-3.38
#1498
Author: Jonas Olsson
Date: Mon, 20 Feb 1989 13:11
47 lines
1780 bytes
make dumps core when values are omitted to flags e.g.:
make -j
Segmentation fault (dump saved in "core")

This occurs in the case where you have a flag with an optional numerical
argument as last argument on the command line. This only occurs on systems
that doesn't allow references of address zero (eg. Sun).

The fix is simple:


*** make.c.org	Mon Feb 20 12:46:24 1989
--- make.c	Mon Feb 20 13:00:15 1989
***************
*** 847,853 ****
  		    case positive_int:
  		      if (*sw == '\0')
  			sw = argv[++i];
! 		      if (isdigit (*sw))
  			{
  			  int i = atoi (sw);
  			  while (isdigit (*sw))
--- 847,853 ----
  		    case positive_int:
  		      if (*sw == '\0')
  			sw = argv[++i];
! 		      if (sw && isdigit (*sw))
  			{
  			  int i = atoi (sw);
  			  while (isdigit (*sw))
***************
*** 888,894 ****
  		    case floating:
  		      if (*sw == '\0')
  			sw = argv[++i];
! 		      if (*sw == '.' || isdigit (*sw))
  			{
  			  *(double *) cs->value_ptr = atof (sw);
  			  while (*sw == '.' || isdigit (*sw))
--- 888,894 ----
  		    case floating:
  		      if (*sw == '\0')
  			sw = argv[++i];
! 		      if (sw && (*sw == '.' || isdigit (*sw)))
  			{
  			  *(double *) cs->value_ptr = atof (sw);
  			  while (*sw == '.' || isdigit (*sw))
Re: Argument decoding bug in gnu make-3.38
#1499
Author: Bob Sutterfield
Date: Mon, 20 Feb 1989 15:47
5 lines
856 bytes
In article <8902201222.AA12455@sisug.sisu.se> jonas@sisug.sisu.se (Jonas Olsson) writes:
   Subject: Re: Argument decoding bug in gnu make-3.38

Are you sure that's what you have?  The current version on
prep.ai.mit.edu is 3.27, dated 12 Dec.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads