Opened 10 years ago

Closed 10 years ago

#576 closed bug (fixed)

segfaulting singular with a series of ring definitions

Reported by: kroeker@… Owned by: somebody
Priority: critical Milestone: 4-1-0 and higher
Component: dontKnow Version: 4-0-0
Keywords: segfault ring creation Cc:

Description

with the following input on my system it is possible to trigger a segfault

ring rng = 5^5,x,dp;
ring rng = 5^2,x,dp;
ring rng = 25,x,dp;
ring rng = (integer,5^5),x,dp;
basering;
ring rng = (integer,5^2),x,dp;
basering;
minpoly;
ring rng = (integer,5,2),x,dp;
ring rng = 5^5,x,dp;
ring rng = 5^2,x,dp;
ring rng = 25,x,dp;
ring rng = (integer,5^5),x,dp;
basering;
ring rng = (integer,5^2),x,dp;
basering;
minpoly;
ring rng = (integer,5,2),x,dp;

can someone reproduce the issue?

Change History (7)

comment:1 Changed 10 years ago by Oleksandr

>  ring rng = 5^5,x,dp;
// ** 3125 is invalid as characteristic of the ground field. 32003 is used.
>  ring rng = 5^2,x,dp;
// ** 25 is invalid as characteristic of the ground field. 32003 is used.
// ** redefining rng **
>  ring rng = 25,x,dp;
// ** 25 is invalid as characteristic of the ground field. 32003 is used.
// ** redefining rng **
>  ring rng = (integer,5^5),x,dp;
// ** redefining rng **
>  basering;
//   coeff. ring is : Z/3125
//   number of vars : 1
//        block   1 : ordering dp
//                  : names    x
//        block   2 : ordering C
>  ring rng = (integer,5^2),x,dp;
// ** redefining rng **
>  basering;
//   coeff. ring is : Z/25
//   number of vars : 1
//        block   1 : ordering dp
//                  : names    x
//        block   2 : ordering C
>  minpoly;
0
>  ring rng = (integer,5,2),x,dp;
// ** redefining rng **
>  ring rng = 5^5,x,dp;
// ** 3125 is invalid as characteristic of the ground field. 32003 is used.
// ** redefining rng **
>  ring rng = 5^2,x,dp;
// ** 25 is invalid as characteristic of the ground field. 32003 is used.
// ** redefining rng **
>  ring rng = 25,x,dp;
// ** 25 is invalid as characteristic of the ground field. 32003 is used.
// ** redefining rng **
>  ring rng = (integer,5^5),x,dp;
Singular : signal 11 (v: 4001):
current line:>> ring rng = (integer,5^5),x,dp;<<
Segment fault/Bus error occurred at 7fcda09b0078 because of 10202 (r:1392734984)
please inform the authors
trying to restart...

in gdb (under Linux) i have got the following:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff598a85e in memset () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff598a85e in memset () from /usr/lib/libc.so.6
#1  0x00000000004b8a5e in _omAlloc0 ()
#2  0x00000000004cbbd8 in rSleftvOrdering2Ordering(sleftv*, ip_sring*) ()
#3  0x00000000004cd133 in rInit(sleftv*, sleftv*, sleftv*) ()
#4  0x0000000000478840 in yyparse() ()
#5  0x000000000046f2d1 in main ()

comment:2 Changed 10 years ago by kroeker@…

the error is probably related to minpoly:

when removing minpoly calls, no error seems to occur for me.

comment:3 in reply to:  2 ; Changed 10 years ago by Oleksandr

Replying to kroeker@…:

the error is probably related to minpoly:

when removing minpoly calls, no error seems to occur for me.

yes, i can confirm that...

comment:4 in reply to:  3 Changed 10 years ago by Oleksandr

> ring rng = (integer),x,dp; basering; 
//   coeff. ring is : Integers
//   number of vars : 1
//        block   1 : ordering dp
//                  : names    x
//        block   2 : ordering C
> minpoly; 
0
> minpoly; 
000000000000000000000000000000000000...lots of zeroes...000000
> minpoly;


Program received signal SIGSEGV, Segmentation fault.
0x0000000000938115 in omFreeLarge ()
(gdb) bt
#0  0x0000000000938115 in omFreeLarge ()
#1  0x000000000076ddb1 in nrzDelete (a=0x7fffffffa2d0) at ../../../libpolys/coeffs/rintegers.cc:103
#2  0x0000000000500cdd in n_Delete (p=0x7fffffffa2d0, r=0x7ffff54aa2d0) at ../../libpolys/coeffs/coeffs.h:366
#3  0x000000000050146f in n_Delete (p=0x7fffffffa2d0, r=0x7ffff54c2068) at ../../libpolys/polys/coeffrings.h:9
#4  0x0000000000502890 in s_internalDelete (t=277, d=0x7ffff54a83f0, r=0x7ffff54c2068) at ../../Singular/subexpr.cc:510
#5  0x0000000000502008 in sleftv::CleanUp (this=0xc5a660 <sLastPrinted>, r=0x7ffff54c2068) at ../../Singular/subexpr.cc:320
#6  0x00000000005016b0 in sleftv::Print (this=0x7fffffffa770, store=0xc5a660 <sLastPrinted>, spaces=0) at ../../Singular/subexpr.cc:112
#7  0x000000000049eef8 in yyparse () at grammar.y:1479
#8  0x0000000000494346 in main (argc=3, argv=0x7fffffffe5f8) at ../../Singular/tesths.cc:232
Last edited 10 years ago by Oleksandr (previous) (diff)

comment:5 Changed 10 years ago by hannes

Resolution: fixed
Status: newclosed

fixed with 4dc1d72673588af9e9fe3cc9a3270636741613a1 (was: double free)

comment:6 Changed 10 years ago by kroeker@…

Resolution: fixed
Status: closedreopened

fixed with 4dc1d72673588af9e9fe3cc9a3270636741613a1

a corresponding regression test is missing. Please add!

comment:7 Changed 10 years ago by hannes

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.