🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #681

Re: awk bug

#681
From: Eric K. Bustad
Date: Wed, 10 Feb 1988 14:50
20 lines
1273 bytes
In article <3763@megaron.arizona.edu>, rupley@arizona.edu (John Rupley) writes:
> This is a bit off the thread of the awk bug, but if the 3B20 can't 
> handle a NULL pointer in awk, how does it handle C code like:
> 	.
> 	cmpstr(strchr("abcdef", 'g'), "hijk")
> 	.
> cmpstr(s, t)
> char *s, *t;
> {
> 	[standard stuff]
> }

It handles C code like the above badly, because the code is basically
wrong.  C does not treat the NULL pointer as equivalent to a NULL string.

Any code that does this will happen to work on a VAX running UNIX, but
will fail on many more machines than just AT&T's 3B20.  I seem to recall
that on some machines you will get a memory access error if you dereference
a NULL pointer!  I rather will that the 3B20 did this, so that these
errors would have been caught much earlier.
Technical Details
Message-ID: <275@ho7cad.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!burl!codas!mtune!whuts!homxb!ho7cad!ekb
References: <672@pttesac.UUCP> <3748@megaron.arizona.edu> <2161@ttrdc.UUCP> <3763@megaron.arizona.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!burl!codas!mtune!whuts!homxb!ho7cad!ekb
From: ekb@ho7cad.ATT.COM (Eric K. Bustad)
Newsgroups: comp.bugs.sys5
Subject: Re: awk bug
Summary: A NULL pointer is not a null string!
Message-ID: <275@ho7cad.ATT.COM>
Date: 10 Feb 88 14:50:18 GMT
References: <672@pttesac.UUCP> <3748@megaron.arizona.edu> <2161@ttrdc.UUCP> <3763@megaron.arizona.edu>
Organization: AT&T Bell Laboratories, Holmdel, NJ
Lines: 20