memory management

16 views
Skip to first unread message

Martin Albrecht

unread,
Jun 25, 2011, 9:53:18 AM6/25/11
to libsingu...@googlegroups.com
Hi,

there's a current push to fix how we allocate/free Singular rings in Sage, cf.

http://trac.sagemath.org/sage_trac/ticket/11339

For this, Volker Braun built Singular with PDEBUG=2

cf. http://trac.sagemath.org/sage_trac/ticket/11339#comment:39

and now we get all kinds of error messages like this:

***omError_FalseAddrOrMemoryCorrupted: addr not as returned by omalloc or
memory corrupted
occured at: ra=0x7f2ae6435783
occured for addr:0x2fc94d0 size:33

My question: how serious are these?

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de

Volker Braun

unread,
Jun 25, 2011, 11:56:02 AM6/25/11
to libsingu...@googlegroups.com
For the record, I had two minor difficulties in using libSingular with PDEBUG enabled. Consider them feature requests ;-) 

One was that idInit and id_Copy are replaced by a macro. Thats somewhat inconvenient as every library user then has to set PDEBUG, too, or the wrong declaration is used. It would be nice if libSingular's interface would not depend on debug settings.

Second, it would be nice if ./configure would understand a --enable-debug to set PDEBUG and friends. The debug messages seem to be very helpful and definitely of interest to every user of libSingular.

Volker Braun

unread,
Jun 26, 2011, 11:54:18 AM6/26/11
to libsingu...@googlegroups.com
I tried to debug this further and I find that initializing rational numbers triggers it... Am I doing something wrong?

    print 'nlRInit'
    cdef number *t = nlRInit(1)
    print "nlNormalize"
    nlNormalize(t)
    print "t.debug = ", t.debug
    print "t.s = ", t.s

yields

  nlRInit
  nlNormalize
  ***omError_FalseAddrOrMemoryCorrupted: addr not as returned by omalloc or memory corrupted
   occured at:  ra=0x7fb34a9d3f1d
   occured for addr:0x3734960 size:33
  !!longrat:im int 1 in longrat.cc:1219
  t.debug =  123456
  t.s =  3



Reply all
Reply to author
Forward
0 new messages