From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from np.nosc.mil ([128.49.228.66]) by hawkwind.utcs.utoronto.ca with SMTP id <24658>; Fri, 6 Feb 1998 23:08:18 -0500 Received: (qmail 3082 invoked by uid 1168); 6 Feb 1998 22:54:55 -0000 Date: Fri, 6 Feb 1998 17:54:55 -0500 Message-ID: <19980206225455.3081.qmail@np.nosc.mil> To: rc@hawkwind.utcs.toronto.edu In-reply-to: (message from Tim Goodwin on Fri, 6 Feb 1998 18:00:37 +0000) Subject: Re: "rc" shell maintainer? From: Vincent Broman Reply-to: broman@nosc.mil -----BEGIN PGP SIGNED MESSAGE----- tgoodwin@cygnus.co.uk replied to me: >> I tried out rc-1.5b2 on my SunOS 4.1.3 (with most Sun patches) machine >> and gcc-2.7.2, and I got a core dump during trip. Any suggestions? > >This change looks wrong to me. > >> - ngroups = getgroups(0, (gid_t *)0); >> + ngroups = getgroups(0, (GETGROUPS_T *)0); The reason for GETGROUPS_T (which POSIX requires to be gid_t) is that some systems, like sunos413, fail to conform to posix by using int's instead of gid_t's for the arrays of groups. This change is for pedantic consistency, NULL being all zeroes for all the hardware I ever deal with. About the core dump... It looks like the binary built on 413 runs fine on 414 but dumps core on a 413 machine. The same thing occurs with a statically linked binary. Also the same with a binary built on 414. So the problem is in my malloc library, I think. It isn't the realloc(NULL,n) bug. Suggestions? Vincent Broman broman@nosc.mil +1 619 553 1641 -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBNNuUfWCU4mTNq7IdAQHIagQAhgk52/AdER9BClyhMxKLdwtF5HmZv7wn zsgzVs9Wrca+iu9pxSI8x2i7fVZ1I0uGhGQ2tEtUyLvRIIOWxmTg2C2NtcJySwLs nPB0JxpzPOGwc21WBevjvoY36hwiRSYI2gc0Jk6HE51BZlyqJ4pYlPRtQ296/X7L qQVEOBr0cfE= =2CWB -----END PGP SIGNATURE-----