[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/1.5.5.1+cvs20040105i |
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
: :' : http://www.debian.org/ |
`. `' |
`- -><- |
signature.asc
Description: Digital signature
- [Gnu-arch-users] posible issue on ia64 with va_args., Robert Collins, 2004/03/10
- Re: [Gnu-arch-users] posible issue on ia64 with va_args., Tom Lord, 2004/03/11
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Miles Bader, 2004/03/11
- Re: [Gnu-arch-users] posible issue on ia64 with va_args., Andrew Suffield, 2004/03/11
- Re: [Gnu-arch-users] posible issue on ia64 with va_args., Jan Hudec, 2004/03/11
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Miles Bader, 2004/03/12
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Jan Hudec, 2004/03/12
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Miles Bader, 2004/03/12
- Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args.,
Andrew Suffield <=
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Stefan Monnier, 2004/03/16
- Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args., Andrew Suffield, 2004/03/18
- Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args., Jan Hudec, 2004/03/18