Re: Debugging Help (X10i on OctoPOS)
Bruce Hoult <[email protected]>
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <CAMU+Eky++iPYemT+u6MSWjKO0fS_LRJ9TG1ZhGzpKw3FCKf2pw@mail.gmail.com> |
Delete/disable all instances of GC_free() in your code. (Maybe use a #define) Does it still happen? On Wednesday, January 15, 2014, Andreas Zwinkau wrote: > 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] <javascript:;> > 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/