#14211: Crash in GiNaC::Number_T::hash()
-------------------------------------------------+-------------------------
Reporter: mjo | Owner: burcin
Type: defect | Status: new
Priority: critical | Milestone: sage-6.7
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: Reported upstream. Developers | Work issues:
acknowledge bug. | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Old description:
> {{{
> sage: pU = vector([0,0])
> sage: pB = vector([2,0])
> sage: f1(tau) = (pU + (tau - 1)*(pB - pU)).row()*(pU + (tau - 1)*(pB -
> pU)).column()
> sage: d = (pB-pU).row()*(pB-pU).column()
> sage: f2(tau) = tau^2 * d + 2*tau*(pU.row()*(pB-pU).column() - d) +
> (pB-2*pU).row()*(pB-2*pU).column()
> sage: bool(f1(x) == f2(x))
> terminate called after throwing an instance of 'std::runtime_error'
> what(): Number_T::hash() python function (__hash__) raised exception
> ------------------------------------------------------------------------
> Unhandled SIGABRT: An abort() occurred in Sage.
> This probably occurred because a *compiled* component of Sage has a bug
> in it and is not properly wrapped with sig_on(), sig_off().
> Sage will now terminate.
> ------------------------------------------------------------------------
> }}}
New description:
{{{
sage: f(x)=matrix()
sage: bool(f(x)==f(x))
terminate called after throwing an instance of 'std::runtime_error'
what(): Number_T::hash() python function (__hash__) raised exception
------------------------------------------------------------------------
Unhandled SIGABRT: An abort() occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Sage will now terminate.
------------------------------------------------------------------------
}}}
--
Comment (by rws):
Minimal case given. In Sage `hash(matrix())` will not allow hashing
probably because `PyObject_Hash` will fail and to prevent that. The fail
happens in Pynac nevertheless because the check is avoided due to function
expansion and there leads to the crash.
The question is how to fix it.
--
Ticket URL: <http://trac.sagemath.org/ticket/14211#comment:8>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.