BC ABI: Don't initialize vtable pointer
Andrew Haley
aph@redhat.com
Thu Jun 15 19:00:00 GMT 2006
Andrew Haley writes:
> Bryce McKinlay writes:
> > Andrew Haley wrote:
> > > + volatile jclass new_class
> > > + = (jclass)_Jv_AllocObj (sizeof (java::lang::Class),
> > > + &java::lang::Class::class$);
> > > + const char *src = class_initializer + sizeof (void*);
> > > + volatile char *dst = (volatile char*)new_class + sizeof (void*);
> > >
> > Why "volatile" ?
>
> Aliasing. The same object is being accessed as java::lang::Class and
> as void*.
I take that back. I'm thinking about an earlier version of this code
that actually had an aliasing issue. I rewrote it to make the
aliasing go away, but I left in the volatile. I'l fix it before I
check it in.
Andrew.
More information about the Gcc-patches
mailing list