#10099: Sage crashes printing copy of symbolic option inside Pynac.
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:  AlexGhitza
  drkirkby               |       Status:  closed
           Type:         |    Milestone:  sage-4.6
  defect                 |   Resolution:  fixed
       Priority:  major  |    Merged in:  sage-4.6.alpha3
      Component:         |    Reviewers:  Karl-Dieter Crisman, David
  algebra                |  Kirkby, Jean-Pierre Flori
       Keywords:         |  Work issues:
        Authors:  Mike   |       Commit:
  Hansen                 |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
   Dependencies:         |
-------------------------+-------------------------------------------------
Description changed by chapoton:

Old description:

> This bug has been seen on several systems. See:
>
> http://groups.google.com/group/sage-
> support/browse_thread/thread/ea1de9abbd6ca23d
>
> Here on an !OpenSolaris x86 machine, but also seen on Linux x86 and PPC
> OS X 10.4.
> {{{
> drkirkby@hawk:~/sage-4.6.alpha2$ ./sage
> ----------------------------------------------------------------------
> | Sage Version 4.6.alpha2, Release Date: 2010-09-29                  |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> **********************************************************************
> *                                                                    *
> * Warning: this is a prerelease version, and it may be unstable.     *
> *                                                                    *
> **********************************************************************
> sage: copy(x)
>

> ------------------------------------------------------------
> Unhandled SIGSEGV: A segmentation fault occurred in Sage.
> This probably occurred because a *compiled* component
> of Sage has a bug in it (typically accessing invalid memory)
> or is not properly wrapped with _sig_on, _sig_off.
> You might want to run Sage under gdb with 'sage -gdb' to debug this.
> Sage will now terminate (sorry).
> ------------------------------------------------------------
> }}}
>
> The bug appears to be in Pynac, as running GDB shows:
>
> {{{
> drkirkby@hawk:~/sage-4.6.alpha2$ ./sage -gdb
> ----------------------------------------------------------------------
> | Sage Version 4.6.alpha2, Release Date: 2010-09-29                  |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> **********************************************************************
> *                                                                    *
> * Warning: this is a prerelease version, and it may be unstable.     *
> *                                                                    *
> **********************************************************************
> /export/home/drkirkby/sage-4.6.alpha2/local/bin/sage-ipython
> GNU gdb 6.8
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "i386-pc-solaris2.11"...
> warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000074
> Python 2.6.4 (r264:75706, Oct  6 2010, 11:29:17)
> [GCC 4.5.0] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
> warning: Lowest section in /lib/libintl.so.1 is .dynamic at 00000074
> warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
> sage: copy(x)
>
> Program received signal SIGSEGV, Segmentation fault.
> GiNaC::ex::print (this=0xc38337c, c=@0x8044f84, level=0) at ex.cpp:58
> 58      ex.cpp: No such file or directory.
>         in ex.cpp
> Current language:  auto; currently c++
>
> }}}
>
> The relevent line in the file
> {{{./sage-4.6.alpha2/pynac-0.2.0.p5/src/ginac/ex.cpp}}} on line 58, which
> is here:
>
> {{{
> // public
>
> /** Print expression to stream. The formatting of the output is
> determined
>  *  by the kind of print_context object that is passed. Possible
> formattings
>  *  include ginsh-parsable output (the default), tree-like output for
>  *  debugging, and C++ source.
>  *  @see print_context */
> void ex::print(const print_context & c, unsigned level) const
> {
>         bp->print(c, level);   /* CRASH CRASH CRASH - This is line 58 */
> }
> }}}

New description:

 This bug has been seen on several systems. See:

 http://groups.google.com/group/sage-
 support/browse_thread/thread/ea1de9abbd6ca23d

 Here on an !OpenSolaris x86 machine, but also seen on Linux x86 and PPC OS
 X 10.4.
 {{{
 drkirkby@hawk:~/sage-4.6.alpha2$ ./sage
 ----------------------------------------------------------------------
 | Sage Version 4.6.alpha2, Release Date: 2010-09-29                  |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 **********************************************************************
 *                                                                    *
 * Warning: this is a prerelease version, and it may be unstable.     *
 *                                                                    *
 **********************************************************************
 sage: copy(x)


 ------------------------------------------------------------
 Unhandled SIGSEGV: A segmentation fault occurred in Sage.
 This probably occurred because a *compiled* component
 of Sage has a bug in it (typically accessing invalid memory)
 or is not properly wrapped with _sig_on, _sig_off.
 You might want to run Sage under gdb with 'sage -gdb' to debug this.
 Sage will now terminate (sorry).
 ------------------------------------------------------------
 }}}

 The bug appears to be in Pynac, as running GDB shows:

 {{{
 drkirkby@hawk:~/sage-4.6.alpha2$ ./sage -gdb
 ----------------------------------------------------------------------
 | Sage Version 4.6.alpha2, Release Date: 2010-09-29                  |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 **********************************************************************
 *                                                                    *
 * Warning: this is a prerelease version, and it may be unstable.     *
 *                                                                    *
 **********************************************************************
 /export/home/drkirkby/sage-4.6.alpha2/local/bin/sage-ipython
 GNU gdb 6.8
 Copyright (C) 2008 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later
 <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "i386-pc-solaris2.11"...
 warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000074
 Python 2.6.4 (r264:75706, Oct  6 2010, 11:29:17)
 [GCC 4.5.0] on sunos5
 Type "help", "copyright", "credits" or "license" for more information.
 warning: Lowest section in /lib/libintl.so.1 is .dynamic at 00000074
 warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
 sage: copy(x)

 Program received signal SIGSEGV, Segmentation fault.
 GiNaC::ex::print (this=0xc38337c, c=@0x8044f84, level=0) at ex.cpp:58
 58 ex.cpp: No such file or directory.
  in ex.cpp
 Current language:  auto; currently c++

 }}}

 The relevent line in the file
 {{{./sage-4.6.alpha2/pynac-0.2.0.p5/src/ginac/ex.cpp}}} on line 58, which
 is here:

 {{{
 // public

 /** Print expression to stream. The formatting of the output is determined
  *  by the kind of print_context object that is passed. Possible
 formattings
  *  include ginsh-parsable output (the default), tree-like output for
  *  debugging, and C++ source.
  *  @see print_context */
 void ex::print(const print_context & c, unsigned level) const
 {
         bp->print(c, level);   /* CRASH CRASH CRASH - This is line 58 */
 }
 }}}

--

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