#8177: Breaking Integer's invariant can lead to a segfault in Sage 4.3.2.alpha1,
Mac OS X 10.6.2
------------------------------+---------------------------------------------
Reporter: mvngu | Owner: tbd
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.3.3
Component: doctest | Keywords:
Author: Florent Hivert | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Changes (by nthiery):
* priority: blocker => major
* status: needs_review => needs_work
Old description:
> From [http://groups.google.com/group/sage-
> devel/browse_thread/thread/7754a347b837fad6 sage-devel] and also
> [http://groups.google.com/group/sage-
> devel/browse_thread/thread/7c920d26ddad3345 reported here]:
> {{{
> > built fine on mac 10.6.2 but one failure for sage -testall :
>
> > The following tests failed:
>
> > sage -t "devel/sage/sage/structure/element_wrapper.py" #
> Segfault
>
> I get the same result on bsd.math (Mac OS X 10.6.2). Doing a verbose
> long doctest, I get:
>
> Trying:
> Integer(1) < l11###line 213:_sage_ >>> 1 < l11
> Expecting:
> False
>
> ------------------------------------------------------------
> Unhandled SIGSEGV: A segmentation fault occured in SAGE.
> This probably occured because a *compiled* component
> of SAGE has a bug in it (typically accessing invalid memory)
> or is not properly wrapped with _sig_on, _sig_off.
> You might want to run SAGE under gdb with 'sage -gdb' to debug this.
> SAGE will now terminate (sorry).
> ------------------------------------------------------------
> }}}
New description:
Integer assumes the following invariant:
x.parent() == ZZ <==> x.__class__ == Integer
Breaking this invariant (which is easy to do using plain Python) can lead
to a segfault.
See the following discussion for how it was detected:
From [http://groups.google.com/group/sage-
devel/browse_thread/thread/7754a347b837fad6 sage-devel] and also
[http://groups.google.com/group/sage-
devel/browse_thread/thread/7c920d26ddad3345 reported here]:
{{{
> built fine on mac 10.6.2 but one failure for sage -testall :
> The following tests failed:
> sage -t "devel/sage/sage/structure/element_wrapper.py" #
Segfault
I get the same result on bsd.math (Mac OS X 10.6.2). Doing a verbose
long doctest, I get:
Trying:
Integer(1) < l11###line 213:_sage_ >>> 1 < l11
Expecting:
False
------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occured in SAGE.
This probably occured because a *compiled* component
of SAGE has a bug in it (typically accessing invalid memory)
or is not properly wrapped with _sig_on, _sig_off.
You might want to run SAGE under gdb with 'sage -gdb' to debug this.
SAGE will now terminate (sorry).
------------------------------------------------------------
}}}
See #8200 which improves the doctests of ElementWrapper to not trigger
this bug anymore. #8200 does not resolve the issue though!
--
Comment:
I have worked further on Florent's patch, and made a separate ticket for
it: #8200.
I have removed the blocker priority on this, and set it on #8200. I leave
this ticket open, since the issue is still there. I let the experts decide
whether this should be a won't fix or not.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8177#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en.