#15671: sig_error() without sig_on()
-------------------------------------+-------------------------------------
       Reporter:  zimmerma           |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  cython             |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Peter Bruin,       |    Reviewers:
  Jeroen Demeyer                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  84ef4e5fc1bb75cc74ea9147e36efc243dc1a6ab
  u/jdemeyer/ticket/15671            |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by pbruin):

 * status:  needs_review => needs_work


Comment:

 Merge conflict because of #16910, which replaced the `mpz_alloc()` in
 question by `sage_malloc()`.

 I tried running the example again (with `ulimit -v 2000000` to keep memory
 usage within reasonable bounds) and got different errors.  First try:
 {{{
 sage: search(15)
 sig_error() without sig_on()

 Program received signal SIGABRT, Aborted.
 0x00007ffff74560d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 (gdb) bt
 #0  0x00007ffff74560d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007ffff745983b in abort () from /lib/x86_64-linux-gnu/libc.so.6
 #2  0x00007fffeb373082 in sig_error () from
 /home/bruinpj/src/sage/local/lib/libcsage.so
 #3  0x00007fffeb373171 in alloc_error () from
 /home/bruinpj/src/sage/local/lib/libcsage.so
 #4  0x00007fffeb3731f8 in sage_gmp_realloc () from
 /home/bruinpj/src/sage/local/lib/libcsage.so
 #5  0x00007fffeb124f21 in __gmpz_realloc (m=0x1b48dfc0, new_alloc=2) at
 realloc.c:33
 #6  0x00007fffeb121e70 in __gmpz_mul_si (prod=0x1b48dfc0, mult=0x1b48df50,
 small_mult=2445144) at mul_i.h:67
 #7  0x00007fffe35185b2 in __pyx_f_4sage_5rings_7integer_7Integer__mul_long
 (__pyx_v_self=0x1b48df30, __pyx_v_n=2445144) at
 build/cythonized/sage/rings/integer.c:12409
 #8  0x00007fffe73c4c73 in
 __pyx_pf_4sage_9structure_7element_11RingElement_10__mul__
 (__pyx_v_right=<sage.rings.integer.Integer at remote 0x1b48df30>,
 __pyx_v_left=
     2445144) at build/cythonized/sage/structure/element.c:16796
 ...
 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.
 }}}
 Second try:
 {{{
 sage: search(15)

 Program received signal SIGSEGV, Segmentation fault.
 0x00007ffff756a1e7 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 (gdb) bt
 #0  0x00007ffff756a1e7 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007fffe3512bc5 in __pyx_f_4sage_5rings_7integer_fast_tp_new
 (__pyx_v_t=<optimized out>, __pyx_v_a=<optimized out>,
 __pyx_v_k=<optimized out>)
     at /usr/include/x86_64-linux-gnu/bits/string3.h:52
 #2  0x00007fffe3532684 in
 __pyx_pf_4sage_5rings_7integer_7Integer_72__pow__
 (__pyx_v_self=<sage.rings.integer.Integer at remote 0x7fffbc5a7ab0>,
 __pyx_v_n=1,
     __pyx_v_modulus=<optimized out>) at
 build/cythonized/sage/rings/integer.c:13906
 #3  0x00007ffff7a43832 in ternary_op (v=<sage.rings.integer.Integer at
 remote 0x7fffbc5a7ab0>, w=1, z=None, op_slot=48, op_name=<optimized out>)
     at Objects/abstract.c:1065
 ...
 Unhandled SIGSEGV: A segmentation fault 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.
 }}}

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

Reply via email to