[Gc] Re[2]: Fwd: Unaligned pointer value in GC_register_dynlib_callback

Ivan Maidanski ivmai at mail.ru
Wed Aug 25 10:59:58 PDT 2010


Hello!

Ok. I've added FIXME to that code block.

Tue, 24 Aug 2010 22:00:40 -0700 (PDT) Hans Boehm <Hans.Boehm at hp.com>:

> Sorry about being late again.
> 
> The patches look fine to me, though the alignment code looks suboptimal.
> GC_push_all eventually does the correct rounding to the next multiple of
> ALIGNMENT.  I'm not sure why we would insist on word alignment for the 
> root sections.  But maybe we should go with your low risk patch and fix 
> that properly after 7.2.
> 
> Hans
> 
> On Tue, 24 Aug 2010, Ivan Maidanski wrote:
> 
> > Hello, Hans!
> >
> > Just in case you've missed the original post. Thanks.
> >
> > Sat, 14 Aug 2010 19:02:54 +0400 Ivan Maidanski <ivmai at mail.ru>:
> >
> >> Hi!
> >>
> >> I was testing GC on a Linux 64-bit box when I got assertion in GC_add_roots_inner for 'start' value. It turned out that in GC_register_dynlib_callback (with PT_GNU_RELRO defined) the value of p->p_vaddr + info->dlpi_addr is not multiple of 8 (but of 4). So, I've added the code for clearing that lowest bits.
> >>
> >> Hans -
> >> what do you think about this? Is it needed to adjust 'start' in other places where GC_add_roots_inner is called (or do it the function itself)?
> >>
> >> PS. I've checked in the patches attached (they also contain a number of misc fixes).
> >> I've also regenerated the building scripts (with more recent tools).
> >>
> >> Regards.


More information about the Gc mailing list