[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Re: Debugging memory management in TeXmacs

From: Lionel Elie Mamane
Subject: [Texmacs-dev] Re: Debugging memory management in TeXmacs
Date: Fri, 20 Oct 2006 11:45:27 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Oct 20, 2006 at 11:12:05AM +0200, Lionel Elie Mamane wrote:
> On Fri, Oct 20, 2006 at 09:56:09AM +0200, Lionel Elie Mamane wrote:

>> If found a reproducible way to crash TeXmacs, (...) The error is
>> that TeXmacs call free() on a pointer that was not returned by
>> malloc() (...) I wasn't able to get a meaningful backtrace.

>> I have to recompile Guile in debugging mode then?

> I did that, and indeed I get a real backtrace now. Here's the
> beginning of it:

> #4  0x00002ac21c19722e in free () from /lib/libc.so.6
> #5  0x000000000041935f in operator delete (ptr=0x1261bc8) at 
> ./Classes/Abstract/basic.cpp:46
> #6  0x0000000000411304 in ~abstract_struct (this=0x1261bd0) at 
> Classes/Abstract/basic.hpp:115
> #7  0x000000000040b88a in ~observer (this=0x7fff8faf9f40) at 
> Classes/Abstract/observer.hpp:69
> #8  0x0000000000605a52 in list_observer (address@hidden, address@hidden) at 
> ./Classes/Atomic/list_observer.cpp:183
> #9  0x0000000000605a9f in insert_observer (address@hidden, address@hidden) at 
> ./Classes/Atomic/list_observer.cpp:188
> #10 0x00000000006d9079 in tree_pointer_rep::set_tree (this=0x10568c0, 
> address@hidden) at ./Classes/Atomic/tree_pointer.cpp:69

I did some investigation at this point and here are my findings:

(gdb) print t
$3 = (tree &) @0x7fff8fafa050: {rep = 0x1271bd0, static init = UNINIT}
(gdb) print t.rep
$4 = (tree_rep *) 0x1271bd0
(gdb) print this->ptr
$11 = (tree_rep *) 0x1271bd0

So "this" and the argument to set_tree have the same tree_rep
pointer (whatever that is; maybe "tree representation"?). Is this
normal and supported?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]