[Gc] Unaligned pointer value in GC_register_dynlib_callback

Ivan Maidanski ivmai at mail.ru
Sat Aug 14 08:02:54 PDT 2010


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 2817 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20100814/e619ec68/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 1726 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20100814/e619ec68/attachment-0001.obj


More information about the Gc mailing list