Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!purdue!decwrl!palo-alto!vixie From: vixie@palo-alto.DEC.COM (Paul Vixie) Newsgroups: comp.unix.wizards Subject: dumping core on *(NULL) is not a function of your processor Message-ID: <3618@palo-alto.DEC.COM> Date: 29 Jul 88 06:47:36 GMT References: <253@iconsys.UUCP> <495@cvaxa.sussex.ac.uk> <11955@ncoast.UUCP> Organization: DEC Western Research Lab Lines: 24 In article <11955@ncoast.UUCP> allbery@ncoast.UUCP (Brandon S. Allbery) writes: # [...] 386 and 680x0 systems, both of which tend to dump core on *(NULL), # the world's favorite Vax-ism.) If you map a page there, *(NULL) will find it. If you don't, you get a page fault. If your page fault handler decides it's a bad address, it'll segfault you. It all depends on the linker, the loader, and the virtual memory system. VMS (which runs on VAXes) doesn't put any page at location 0, just to catch this type of bug. The VAX/VMS C manual warns in its portability section that *(NULL) will cause rude things to happen to your program. Summary: don't blame it on the Vax, blame it on Real 4.3BSD. We're all sort of expecting an ld option to appear in 4.4 that makes this an option. It's complicated because the kernel need to know about it also, and nobody wants to allocate another magic number (or another set of them, really) and it's hard to decide how else to pass the option in to the kernel. Got any ideas? -- Paul Vixie Digital Equipment Corporation Work: vixie@dec.com Play: paul@vixie.UUCP Western Research Laboratory uunet!decwrl!vixie uunet!vixie!paul Palo Alto, California, USA +1 415 853 6600 +1 415 864 7013