Pair of Twiggys

Ethan Dicks ethan.dicks at gmail.com
Thu Mar 16 16:09:35 CDT 2017


On Wed, Mar 15, 2017 at 6:55 PM, Toby Thain via cctalk
<cctalk at classiccmp.org> wrote:
> On 2017-03-15 5:17 PM, Peter Coghlan via cctalk wrote:
>> Has anybody else noticed that the meaning of "portable code" seems to have
>> morphed into "can be built on two or three different flavours of Linux"?
>
> 1983. All the world's a VAX.

And about 2 years later, I learned C on a VAX...

> 1993. No sorry, all the world's a SPARC.
>
> 2013. Oops, no, all the world's an x86.

>From 1997-1999, I worked at Lucent where we ran SPARC, NCR x86 boxes,
DEC Alpha, and a couple of lonely VAXen... One of the interesting
episodes in that transitional time was when some app/utility program
written by the group "worked on the NCR" but "failed on the SPARC",
which was proof to some of them that something was wrong with the
SPARC or at least "better" about the x86... what was really going on
was someone did a strlen() of a pointer which was NULL, and really
didn't understand that when the man page says that behavior is
"undefined", that *both* machines were doing the right thing (they
figured it should act only like strlen() of a pointer to a NULL and
return 0, rather than segfault for attempting to dereference a pointer
to 0x00000000...)

I politely suggested they should go back and read up on what
"undefined" means and then go fix their code...

-ethan


More information about the cctalk mailing list