Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!tikal!sigma!uw-nsr!john From: john@uw-nsr.UUCP (John Sambrook) Newsgroups: comp.bugs.misc Subject: Mkmf(1) bug report and fix. Message-ID: <1190@uw-nsr.UUCP> Date: 2 Jan 88 19:15:06 GMT Reply-To: john@nsr.bioeng.washington.edu (John Sambrook 548-4386) Organization: UW-Bioengineering, Seattle, WA Lines: 39 Keywords: mkmf(1) 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