#13863: Segfault in pari galoisconj0
-----------------------------+----------------------------------------------
   Reporter:  vbraun         |             Owner:  was     
       Type:  defect         |            Status:  new     
   Priority:  major          |         Milestone:  sage-5.6
  Component:  number theory  |          Keywords:          
Work issues:                 |   Report Upstream:  N/A     
  Reviewers:                 |           Authors:          
  Merged in:                 |      Dependencies:          
   Stopgaps:                 |  
-----------------------------+----------------------------------------------
 I found this using electric fence:
 {{{
 [vbraun@volker-desktop sage-5.6.beta0]$ ef ./sage -gdb
 ...
 sage: K.<a> = NumberField(x^2+1)
 sage: K.pari_nf().nfgaloisconj()

 Program received signal SIGSEGV, Segmentation fault.
 galoisanalysis (T=T@entry=0x7fffa570cf88, ga=ga@entry=0x7fffffffba50,
 calcul_l=calcul_l@entry=1)
     at ../src/basemath/galconj.c:1305
 1305    ../src/basemath/galconj.c: No such file or directory.
 Missing separate debuginfos, use: debuginfo-install
 atlas-3.8.4-7.fc18.x86_64 expat-2.1.0-4.fc18.x86_64
 fontconfig-2.10.2-1.fc18.x86_64 glibc-2.16-28.fc18.x86_64
 libgcc-4.7.2-8.fc18.x86_64 libpng-1.5.13-1.fc18.x86_64
 libstdc++-4.7.2-8.fc18.x86_64
 (gdb) bt
 #0  galoisanalysis (T=T@entry=0x7fffa570cf88, ga=ga@entry=0x7fffffffba50,
 calcul_l=calcul_l@entry=1)
     at ../src/basemath/galconj.c:1305
 #1  0x00007fffea0b4353 in galoisconj4_main (T=0x7fffa570cf88,
 T@entry=0x7fffa570cfb0,
     den=0x7fffea2d2c40 <readonly_constants+32>, flag=0) at
 ../src/basemath/galconj.c:2212
 #2  0x00007fffea0b4f86 in galoisconj (nf=0x7fffa570cfb0, d=<optimized
 out>) at ../src/basemath/galconj.c:2312
 #3  0x00007fffea0b56c9 in galoisconj0 (nf=<optimized out>,
 flag=flag@entry=0, d=<optimized out>,
     prec=<optimized out>) at ../src/basemath/galconj.c:2321
 #4  0x00007fffe2cc6974 in
 __pyx_pf_4sage_4libs_4pari_3gen_3gen_608nfgaloisconj (
     __pyx_v_self=__pyx_v_self@entry=0x7fffa73cde68, __pyx_v_flag=0,
 __pyx_v_denom=<optimized out>,
     __pyx_v_precision=0) at sage/libs/pari/gen.c:38446
 #5  0x00007fffe2cc6dd0 in
 __pyx_pw_4sage_4libs_4pari_3gen_3gen_609nfgaloisconj
 (__pyx_v_self=0x7fffa73cde68,
     __pyx_args=<optimized out>, __pyx_kwds=0x0) at
 sage/libs/pari/gen.c:38360
 #6  0x00007ffff7ae7742 in call_function (oparg=<optimized out>,
 pp_stack=0x7fffffffbf80) at Python/ceval.c:4021
 #7  PyEval_EvalFrameEx (f=f@entry=0x7fffa55aee30,
 throwflag=throwflag@entry=0) at Python/ceval.c:2666
 }}}
 The relevant piece of the pari code seems to be
 {{{
 static int
 galoisanalysis(GEN T, struct galois_analysis *ga, long calcul_l)
 {
 ...
   n = degpol(T);
   O = const_vecsmall(n, 0);
 ...
   ga->p4 = O[4];     <--- this is where the segfault occurs
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13863>
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