From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,5747331edea7cbab X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,85404311f8041f7a X-Google-Attributes: gid102b75,public X-Google-ArrivalTime: 2001-07-18 19:07:34 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsfeed.media.kyoto-u.ac.jp!norand.com!avalon.net!dsiebert From: dsiebert@excisethis.khamsin.net (Douglas Siebert) Newsgroups: comp.sys.dec,comp.arch Subject: Re: using memory beyond the "top" of stack (was: Re: CPU failure in an SMP system (was Re: Compaq kills Alpha)) Date: Thu, 19 Jul 2001 02:07:30 +0000 (UTC) Organization: Avalon Networks Inc. Message-ID: <9j5fd2$bgu$1@sword.avalon.net> References: <994616870.688233@haldjas.folklore.ee> <9iuka3$rku$1@mach.thp.univie.ac.at> <9j0jts$r2u$1@sword.avalon.net> <1bn163xzf0.fsf@cs.nmsu.edu> NNTP-Posting-Host: slacker.khamsin.net X-Trace: sword.avalon.net 995508450 11806 12.29.144.54 (19 Jul 2001 02:07:30 GMT) X-Complaints-To: support@avalon.net NNTP-Posting-Date: Thu, 19 Jul 2001 02:07:30 +0000 (UTC) Xref: archiver1.google.com comp.sys.dec:5995 comp.arch:14288 Joe Pfeiffer writes: >Real fun was porting VAX to Sun. I honestly thought C specified that >a NULL pointer was an empty string. Passing a pointer to an int with >a value of less than 256 to a function expecting a pointer to a char >was a good one, too. That's probably why HP-UX mapped a page of 0s at 0x0, so dereferencing a NULL pointer wouldn't cause a segmentation fault. There is an option to disable this mapping when you compile the executable (it is mapped in by the loader) but last time I checked (a few years ago) it was still the default. That's the sort of ugly thing the market makes you do because if you don't, people will say "this machine sucks, it can't run this perfectly good C code, which I know is good because it runs on that other machine over there just fine" Once it is in there, making it no longer the default would probably break enough old software that a lot of people would stupidly assume the new version of the compiler is buggy. I'm sure HP isn't the only one who did this sort of ugly thing. It was kind of nice how Alpha left the whole 32 bit chunk at 0x0 unmapped to make it more easy to catch int<->pointer problems. Though I'm still a bit unhappy about their decision to have a 32 bit int in the first place, now we are stuck with that decision forever in 64 bit Unix, and the original meaning of "int" (largest integral type) is no longer valid. -- Douglas Siebert dsiebert@excisethis.khamsin.net I have discovered a remarkable proof which this .sig is too small to contain!