Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!cunixf.cc.columbia.edu!cs.columbia.edu!close.cs.columbia.edu!ji From: ji@close.cs.columbia.edu (John Ioannidis) Newsgroups: comp.sys.hp Subject: BUG: incorrect argument to gethostname(2) panics kernel Message-ID: <1990Aug15.223852.10037@cs.columbia.edu> Date: 15 Aug 90 22:38:52 GMT Sender: ji@close.cs.columbia.edu (John "Heldenprogrammer" Ioannidis) Reply-To: ji@close.cs.columbia.edu (John "Heldenprogrammer" Ioannidis) Organization: Columbia University Department of Computer Science Lines: 23 The gethostname(2) system call has the following syntax: int gethostname(name, length) char *name; int length; Older implementations needed the length argument to be an int *, and the length paramenter was a value-result parameter. I compiled such a program, and tried running it on my HP-9000/350 running HP-UX 7.0, and instead of getting a segmentation violation (the length being in the billions, since it was an address in the stack), the kernel crashed with a bus error. If anyone at HP is reading this, please consider fixing it in some future release. /ji In-Real-Life: John "Heldenprogrammer" Ioannidis E-Mail-To: ji@cs.columbia.edu V-Mail-To: +1 212 854 5510 P-Mail-To: 450 Computer Science \n Columbia University \n New York, NY 10027