#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 leif):

 I have no idea why `real_mpfr`[`.pyx`] shouldn't initialize [the] PARI
 [library] (i.e., the `pari_instance` variable defined in
 `sage/libs/pari/gen.pyx`), but you (Karl-Dieter) could verify it gets
 initialized by putting some print statement(s) into `PariInstance`'s
 `__init__()`, preferably (also) around `pari_init_opts()`, to make sure
 the latter really gets called, because of
 {{{
 #!python
         if bot:
             return  # pari already initialized.
 }}}

 There are a few things that might be relevant here:

  * 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.)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11551#comment:17>
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.

Reply via email to