#11551: Pari segfault on Sage startup in Cygwin
------------------------+---------------------------------------------------
Reporter: kcrisman | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.2
Component: cygwin | Keywords: pari
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
Comment(by kcrisman):
>
> * Cython doesn't support C `enum` constants (here e.g. `INIT_DFTm`),
therefore one has to declare them as `cdef extern int`s, but I don't think
that's the problem here.
>
> * `bot` is a very bad name for a global variable (of a ''library''!),
i.e. some other library / module might use the same for a different
purpose, such that the one supposed to be PARI's may actually already have
some non-zero value despite PARI not yet being initialized. (The
early-`return` check in `PariInstance`'s `__init__()` worsens that to some
extent, though other problems would certainly arise later in that case.)
It's not far enough along to try these, but here's something naive.
{{{
cdef GEN pari_float
<snip>
else:
<snip>
# Create a PARI REAL
pari_float = cgetr(2 + rounded_prec / wordsize)
<snip>
cdef PariInstance P
P = sage.libs.pari.all.pari
return P.new_gen(pari_float)
}}}
So it looks like the GEN gets defined before the !PariInstance - is that a
problem for some reason? Again, this is totally naive, and probably wrong
since this works everywhere else.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11551#comment:19>
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.