Debugging Help (X10i on OctoPOS)
Andreas Zwinkau <[email protected]>
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
I could use some help/hints for debugging a GC problem.
First some context: We use a modified X10 compiler (X10i) with a custom
backend (libfirm). Compilation target is a custom operating system
(OctoPOS), which in my case is running on top of Linux. We ported bdwgc
(7.3alpha3) to use the corresponding OctoPOS API to stop the world etc.
It works, except of the problem below.
For a longer running application we sometimes observe some memory
corruption. (We mostly observe a deadlock, which might be symptom of the
same bug or another bug.)
Using GC_DEBUG I sometimes get:
GC_debug_free: found previously deallocated (?) object at e811eee0 in or
near object at e811eee8(<smashed>, appr. sz = 133)
Occasionally it crashes on the following assert in malloc.c:270, which
apparently checks that an address from the freelist is within the
correct heap or NULL.
GC_ASSERT(0 == obj_link(op)
|| ((word)obj_link(op)
<= (word)GC_greatest_plausible_heap_addr
&& (word)obj_link(op)
>= (word)GC_least_plausible_heap_addr));
Using gdb, I can see that "obj_link(op)" points to a vtable, which is
not heap allocated but static data.
The vtable-pointer is at offset 0 in our objects. Object initialization
follows the usual flow of "allocate;set vptr;call constructor". Hence my
current theory: Either allocate does not remove the object from the
freelist correctly or "set vptr" is performed on unallocated/freed memory.
Any tips how to proceed?
I foolishly closed the gdb session, so currently I am rerunning the app
to trigger the assertion again. :-/
cheers
--
Andreas Zwinkau
Karlsruhe Institute of Technology (KIT)
Phone: +4972160848351
Email: [email protected]
Web: http://pp.info.uni-karlsruhe.de/personhp/andreas_zwinkau.php
_______________________________________________
Gc mailing list
Gc-V9/[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
signature.asc
(application/pgp-signature, 555 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS1lV1AAoJEKm3M8a3pi2iZmcH/iHhblNh7cjEQCumQjWN1aSB TvjEZfyIBdA3iOH0Sp6rUPOYegwG87MiYMbK7Gx+ibOx0UycEqRHHGlsC7iv1MAE 8+2ZaCV1mWWVsxX6ZLR0eBzPK9J2H9aP6xFCRy5ALYaW97wXuG9ZTRwwshpibZBS ikDQ24AarLCZ1BvGCFbIJMTzzSJ3k1bhOl1Hloiyjd6Qh6NOFEvPA+6W03TQkZxh 3mMQFrt6SSLRWNN+lL5k3l4eQW1FeEKlXPnVNpyWZn/BU7ue76j0A/zk8gySC832 gZqqwGgS+1YugNTOxHGaaU27lUBnjok3d49hKqNIwJ+a6TkfN/J8i/r1NCo8UCc= =ExEp -----END PGP SIGNATURE-----