KSH Portability, Example on SGI IRI
carroll at snail.CS.UIUC.EDU
carroll at snail.CS.UIUC.EDU
Sun May 8 15:24:00 AEST 1988
Does anyone know if the following is still a bug? It shows up on (as
per comp.lang.c) when you dereference a NULL pointer.
If you type in something like `` or $() , ksh core dumps on Sun's, Sequent's,
and RT's. It does not on 3b's, because you can refer to location 0 without
a problem (you can't *write* it, but you can read it). The problem is that
the function taht deals with command substitution return NULL if there
isn't anything, but the function that calls it does check to see
if that happened, and tries to read a pointer to a structure. We hacked it
to return the same thing as ':' returns if nothing is there.
Alan M. Carroll amc at woodshop.cs.uiuc.edu carroll at s.cs.uiuc.edu
Grad Student (TA) / U of Ill - Urbana ...{ihnp4,convex}!uiucdcs!woodshop!amc
"Too many fools who don't think twice
Too many ways to pay the price" - AP & EW
More information about the Comp.unix.questions
mailing list