🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by John Sambrook Sat, 02 Jan 1988 19:15
Mkmf(1) bug report and fix.
#93
Author: John Sambrook
Date: Sat, 02 Jan 1988 19:15
40 lines
1754 bytes
I've been using mkmf(1) for more than a year and only recently
found this bug, so it's not likely to have affected many people.
However, the fix is dead easy.  BTW, mkmf(1) is a great tool; if
you don't have it you should consider getting it.

The problem is in the function lookupinclude() in file depend.c.
If you run mkmf(1) in a directory containing assembler sources
the variable "includetable" is never initialized.  A few lines
later htlookup() may be called with this garbage value, causing
a traceback.

Here is a context diff of the fix I chose to make:

*** depend.c.old	Sat Jan  2 10:42:22 1988
--- depend.c.new	Sat Jan  2 10:41:37 1988
***************
*** 373,378
  		case INCLUDE_PASCAL:
  			includetable = P_INCLUDETABLE;
  			break;
  		}
  	return((includetable == NULL) ? NULL : htlookup(incname, includetable));
  }

--- 373,381 -----
  		case INCLUDE_PASCAL:
  			includetable = P_INCLUDETABLE;
  			break;
+                 default:
+                         includetable = NULL;
+                         break;
  		}
  	return((includetable == NULL) ? NULL : htlookup(incname, includetable));
  }


-- 
John Sambrook                        Internet: john@nsr.bioeng.washington.edu
University of Washington RC-05           UUCP: uw-nsr!john
Seattle, Washington  98195               Dial: (206) 548-4386
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