Date: Wed, 6 Oct 1999 01:50:03 -0700 (PDT) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/14142: sendmail: mci.c: bad pointer conversion in debug print Message-ID: <199910060850.BAA40579@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/14142; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: netch@lucky.net Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/14142: sendmail: mci.c: bad pointer conversion in debug print Date: Wed, 6 Oct 1999 18:46:08 +1000 (EST) On Wed, 6 Oct 1999, Valentin Nechayev wrote: > Bruce Evans <bde@zeta.org.au> wrote: > > ... All these > > problems can be fixed better now by casting pointers to > > (u_long)(uintptr_t)(void *) and printing them with %lx, or if the format > > doesn't matter, by casting pointers to (void *) and printing them with %p. Except uintptr_t is not supported in RELENG_3. > > The original code was broken at runtime (it shows only the low 32 bits of > > pointers on FreeBSD-alpha). > > Of course, original code is broken also and really. Do you know the reason > of using integral formats instead of %p in original code? It's probably "portability". Some systems don't/didn't have %p. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910060850.BAA40579>