[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args.

From: Andrew Suffield
Subject: Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args.
Date: Tue, 16 Mar 2004 07:02:12 +0000
User-agent: Mutt/

On Fri, Mar 12, 2004 at 05:01:04PM -0500, Miles Bader wrote:
> On Fri, Mar 12, 2004 at 10:03:04AM +0100, Jan Hudec wrote:
> > > Even when that relation holds, this particular case can screw you; for
> > > it to `work', you need sizeof (int) == sizeof (whatever_ptr).
> > 
> > Even than, the spec does not guarantee you are safe.
> > 
> > The spec does not say anything about relation of pointer to integer. It
> > implies, that (void *)0 == NULL and (int)NULL == 0, but does not say the
> > memory representation is the same.
> Of course, but I don't think that particular silliness happens in practice
> anymore (though I suppose maybe there were a few wonky-ass computers back in
> the day that had odd non-zero representations of a null pointer).  There's
> too much dependence on using bzero to initialize pointer-containing
> structures these days for a non-zero null to fly, and there's no pressure for
> that to change (whereas there _is_ pressure pushing integer/pointer size
> differences).

It happens with some debugging systems (which I believe was the
original intent), where they use a tagged NULL pointer so that instead
of "Dereferenced NULL <segfault>", you get "Dereferenced NULL from
foo.c:63 <segfault>", which can be very useful on occasion.

  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' : |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]