Hello Singular team, we came across two bugs and the gcc 4.3 compilation issue in the latest Singular code basis that we ship with Sage 2.9.3.
The first bug is #1703: one mpz is leaked in longrat.cc triggered by linear_code.py See: http://trac.sagemath.org/sage_trac/ticket/1703 Valgrind reports: ==32468== at 0x4A1BB35: malloc (vg_replace_malloc.c:207) ==32468== by 0x6160C87: __gmpz_init (in /tmp/Work-mabshoff/release- cycle/sage-2.10.alpha0/local/lib/libgmp.so.3.4.1) ==32468== by 0x128B87AF: nlNormalize(snumber*&) (longrat.cc:1147) ==32468== by 0x128DBE70: p_Normalize(spolyrec*, sip_sring*) (polys.cc:800) I tracked this down to "void nlNormalize (number &x)" in longrat.cc. The patch named "Singular-3-0-4-2-fix-longrat.cc-mpz-leak.patch " attached to the ticket fixes the issue for me. The rebuild Singular does not have the leak any more and valgrind does not report any issue when running the same doctest. Our test suite also passes. I assume we exposed the issue by hooking the GMP allocator so that it ends up using standard malloc, so that valgrind actually catches it. mmap based omalloc allocations are completely ignored/not tracked by valgrind. The code and the patch is simple enough to actually see that the mpz isn't freed in that code path. The second bug is #1705: factorization of polynomials over non-prime finite fields is TOTALLY BROKEN in Sage (and Singular?!) See http://trac.sagemath.org/sage_trac/ticket/1705 This was confirmed with the official Singular binary by Martin Albrecht: > ring r = (3,a),(x,y),dp; > minpoly = a^2 + 2*a + 2; > poly f = (x-a)*(y-a); > factorize(f); [1]: _[1]=1 _[2]=xy+(-a)*x+(-a)*y+(a+1) [2]: 1,1 For all details also check out http://trac.sagemath.org/sage_trac/ticket/1705 - we do not have a solution for that issue and as far as I am aware nobody has attempted to track this down yet. gcc 4.3 compilation: I emailed a while ago about a patch that makes Singular compile with the current gcc 4.3 snapshot. I never heard back. So is there interest for that one, too? Ismail Dönmez from Pardus [a turkish linux distribution] ended up coding up the same patch in parallel with me which is nearly identical with my solution, so I guess the best thing is that we should share credit for that one. It is available from http://svn.pardus.org.tr/pardus/devel/programming/libs/singular/files/gcc-4.3.patch Let me know if there are any more questions or comments. Cheers, Michael --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---