-
-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deal with hooked tp_* functions when using a debug build of Python #13868
Comments
comment:1
In fact, thats commented out:
|
comment:2
I tried to uncomment both these lines in integer.pyx and real_double.pyx but this lead to segfaults when starting Sage. If I prevent the use of the fast tp_*, Sage starts (although I get a TypeError in sage/libs/gen/late_import, I've not recompiled everything after rebuilding Python) So this will need more work. |
comment:3
I found the bug, the |
Attachment: trac_13868_tp_hooks_and_debug.patch.gz Initial patch |
comment:4
Replying to @vbraun:
I am a bit puzzled. Why is this only done when the debug preprocessor macro is used? Do you claim that this is a bug only in debug mode? Why could it not create trouble without debug mode? |
comment:5
Anyway, using your patch plus the new cython plus the latest version of the python spkg in debug mode, I am now able to start Sage without a crash. It "only" reports
But on #13867 you said that for this one needs a new Singular spkg (hopefully one that still allows for using xalloc!). |
comment:6
Replying to @simon-king-jena:
Found it! #13876, right? |
comment:7
Yes! |
Author: Volker Braun |
comment:8
With the patches listed at #13877, I get:
So, tp_compare does something unexpected here. |
comment:9
Did you compile everything from scratch? You definitely need to recompile pynac with debugging, maybe more? |
comment:10
I did sage -ba after installing all stuff on top of an existing sage-5.5. |
comment:11
If you start on sage-5.5 you at least need the patch from #13740, maybe more... |
comment:13
I don't know whether indented preprocessor directives like
are standard C. Maybe they are (GCC accepts them and documents this), but usually this is written as
|
comment:14
Pre-ANSI C did not allow for space, but those compilers are long dead (even by skynet standards). Its legal in all C versions that will at least start building Sage. I prefer the Cython-style indentation, then you don't have to mentally switch when reading it. |
comment:15
It would be nice if we could review and merge this ticket as it is the cause for the segfault during Sage "make" with |
comment:16
Replying to @vbraun:
Is this still the case? With all the new spkgs mentioned in the ticket description of #13864 (in particular, with cython-0.17.4), sage builds and starts fine on bsd.math, with SAGE_DEBUG=yes. Or has that only been a problem on other systems? |
Initial patch + typo fixed. |
comment:17
Attachment: trac_13868_tp_hooks_and_debug-typo.patch.gz Works fine and seems correct to me. |
Reviewer: Jean-Pierre Flori |
This comment has been minimized.
This comment has been minimized.
Merged: sage-5.6.beta3 |
Python debug checks are confused by the fast tp_* functions we hook in integer.pyx and real_double.pyx
Apply attachment: trac_13868_tp_hooks_and_debug-typo.patch.
CC: @vbraun @simon-king-jena @jdemeyer
Component: build
Keywords: hook debug
Author: Volker Braun
Reviewer: Jean-Pierre Flori
Merged: sage-5.6.beta3
Issue created by migration from https://trac.sagemath.org/ticket/13868
The text was updated successfully, but these errors were encountered: