#10113: Calling seed() incorrectly causes Sage to crash with SIGSEGV 
(Segmentation
Fault)
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  jason     
       Type:  defect    |      Status:  new       
   Priority:  major     |   Milestone:  sage-4.6.1
  Component:  misc      |    Keywords:            
     Author:            |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------
 Using several versions of Sage on several operating systems:

  * 4.5.rc0 on OS X (bsd.math)
  * 4.5.2 on Linux  (sage.math)
  * sage-4.6.alpha3 on !OpenSolaris (my machine hawk)

 it is possible to crash Sage quite easily with:
 {{{
 sage: seed(1,2)


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

 }}}

 Running under !OpenSolaris with gdb, I see:


 {{{
 drkir...@hawk:~/sage-4.6.alpha3$ ./sage -gdb
 ----------------------------------------------------------------------
 | Sage Version 4.6.alpha3, Release Date: 2010-10-08                  |
 | 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.alpha3/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  9 2010, 22:06:12)
 [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: seed(1,2)

 Program received signal SIGSEGV, Segmentation fault.
 0xfdbdaf1d in __gmp_randclear ()
    from /export/home/drkirkby/sage-4.6.alpha3/local/lib//libgmp.so.3
 (gdb) bt
 #0  0xfdbdaf1d in __gmp_randclear ()
    from /export/home/drkirkby/sage-4.6.alpha3/local/lib//libgmp.so.3
 #1  0x081889b8 in ?? ()
 #2  0x081c1ffc in ?? ()
 #3  0x00000002 in ?? ()
 #4  0x00000034 in ?? ()
 #5  0x00000000 in ?? ()
 }}}

 so it looks like the random number generator thats being seeded (or not as
 the case may be) is part of gmp, and not gsl or anywhere else in Sage that
 has random number generators.

 Plenty of other arguments to {{{seed()}}} can cause Sage to crash too.

 Dave

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