Xref: utzoo comp.arch:4822 comp.lang.c:10127 Newsgroups: comp.arch,comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: negative addresses Message-ID: <1988May15.222335.13174@utzoo.uucp> Organization: U of Toronto Zoology References: <2393@uvacs.CS.VIRGINIA.EDU> <21541@amdcad.AMD.COM> Date: Sun, 15 May 88 22:23:35 GMT > >Unfortunately, it is a real problem, because there are zillions of > >programs that implicitly assume that pointers are all-zeros. > > I don't think this is true. How about an example? Any program written by a programmer who believes the 4.3BSD manuals, or any of their ancestors, all of which claim that the arg-list terminator for execl is 0 rather than (char *)0. A pox on the Berkloids for not having fixed this long ago! I'm not intimately acquainted with the problem myself, but I do know that at least one computer project that wanted to use a non-zero null pointer studied the situation and decided to change the hardware instead. >Not that much of a problem, really. The compiler knows about static >data at compile time, and if not explicitly initialized it can output >something like > ptrname: .word 0xF0F0F0F0 ; null pointer pattern >in the data section of the code it generates. True, which is why I described it as "a bit of a pain" rather than as a significant problem. The biggest nuisance, actually, is the loss in effectiveness of the "BSS" optimization for object-module size. -- NASA is to spaceflight as | Henry Spencer @ U of Toronto Zoology the Post Office is to mail. | {ihnp4,decvax,uunet!mnetor}!utzoo!henry