Hi!

Currently I am puzzled by a bug, and so far my approaches to tackle it
down failed. I guess I should use debugging tools such as gdb, but I
did not find a tutorial or wiki page concerning "sage -gdb". For
example: When I start "sage -gdb", how do I get the gdb prompt so that
I can set break points?

I do not expect that you can guess the source of the problem from the
following description; but at least you may understand why I am
puzzled.

I have an instance of some Cython extension class, relying on C
data.Given certain input data, some method results in a "glibc
detected: invalid next size" in openSUSE 11.0, Intel Core Duo,
respectively in a SIGBUS on sage.math (and after the SIGBUS I don't
get a prompt from the system, so, I have to shut down ssh),
respectively SIGSEGV on sage.math when running sage -gdb.

While debugging,  I saved "self", in order to have a more easily
reproducible example. But after loading the saved data, there is no
crash.

Now comes the strange thing:
I found out that the error also disappears if inside the function I
insert in the right place the line
 N = loads(dumps(self))
So, self should not be changed by this line, but the error vanishes.
dumps alone does not suffice.

The method in question gets a list "el" as parameter.
I get an iterator from it, and give a custom name to the "next()"
method:
   L = el.iter()
   Lnext = L.next

It turns out: Inserting "N=loads(dumps(self))" helps if inserted after
the line Lnext = L.next, but it does not help when inserted before the
line.

But how can this line interfere with my data? "el" is simply a list of
python ints! There is no instance of my extension class in it.

This is what I can't understand.

Any pointer to a tutorial on relevant debugging techniques is greatly
appreciated!

Best regards,
Simon

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to