Changes between Version 89 and Version 117 of Ticket #13731
- Timestamp:
- 12/03/12 13:04:46 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13731
-
Property
Status
changed from
new
toneeds_review
-
Property
Status
changed from
-
Ticket #13731 – Description
v89 v117 1 We created a new patchlevel for the singular-3-1-5 spkg. It contains backports of some upstream fixes of several memory corruptions. 2 3 If one does `export SINGULAR_XALLOC=yes` before installing the spkg, Singular's usual memory manager "omalloc" will be replaced by "xalloc". This is a compatibility layer on top of malloc. The resulting Singular executable and library will be slower, but allows the use of some debug tools. 4 5 Here is the background. 6 1 7 We have several indications that interaction with libsingular's memory management is tricky. Debugging is hard, because libsingular uses omalloc for its memory management and that hides all allocation/deallocation from conventional memory checking tools. Singular's allocation library is relatively pluggable, though, and (at a speed penalty) one can mostly switch it to using the system malloc for everything. 2 8 3 For that purpose, one can use one of the following:9 Preliminary packages for linux and for osx using malloc are found here: 4 10 5 11 * [http://sage.math.washington.edu/home/nbruin/singular-3-1-5.malloc-linux.spkg] (for linux). It replaces omalloc by the system malloc and tries to keep the changes small. It does build a libsingular library, but the Singular executable does not work. 6 12 * [http://sage.math.washington.edu/home/nbruin/singular-3-1-5.malloc.spkg] (for OSX). Same as the previous item. 13 14 With the help from [https://groups.google.com/forum/?hl=en&fromgroups=#!topic/libsingular-devel/AZI-6eZAgus libsingular-devel], we managed to use xalloc instead of malloc. We now obtain Singular executable and library, and can still use debugging tools. 15 16 '''__Install__''' 17 7 18 * [http://sage.math.washington.edu/home/SimonKing/SAGE/spkgs/singular-3-1-5.p2.spkg] (both linux and OSX). 8 * It contains [attachment:singular_15435.patch] and [attachment: singular_part_of_changeset_baadc0f7.patch], which backport upstream fixes.9 * It usually builds with omalloc. If `export SINGULAR_XALLOC=yes`, then it builds with xalloc, which is a compatibility layer for omalloc on top of malloc. See the discussion on [https://groups.google.com/forum/?hl=en&fromgroups=#!topic/libsingular-devel/AZI-6eZAgus libsingular-devel]10 * It builds both a working libsingular library and a Singular executable.11 19 12 With the [http://sage.math.washington.edu/home/nbruin/singular-3-1-5.malloc-linux.spkg linux spkg], one obtains: 20 The spkg contains [attachment:singular_15435.patch] and [attachment: singular_part_of_changeset_baadc0f7.patch], which backport upstream fixes. 21 It usually builds with omalloc. If `export SINGULAR_XALLOC=yes`, then it builds with xalloc, which is a compatibility layer for omalloc on top of malloc. 22 23 '''__Bugs fixed__''' 24 25 With the preliminary [http://sage.math.washington.edu/home/nbruin/singular-3-1-5.malloc-linux.spkg linux spkg], one obtains: 13 26 {{{ 14 27 $ export MALLOC_CHECK_ 3 … … 45 58 at sage/rings/polynomial/plural.cpp:12060 46 59 }}} 47 running it in valgrind gets you complaints about the same locations. Meanwhile two of the underlying problems where found and fixed upstream. [http://sage.math.washington.edu/home/SimonKing/SAGE/spkgs/singular-3-1-5.p2.spkg] contains backports of these fixes. 60 running it in valgrind gets you complaints about the same locations. 61 62 On OSX, `MALLOC_CHECK_` is not available. But gmalloc does detect the crash. 63 64 The new spkg fixes that problem 65 66 '''__Testing__''' 67 68 Meanwhile two of the underlying problems where found and fixed upstream. [http://sage.math.washington.edu/home/SimonKing/SAGE/spkgs/singular-3-1-5.p2.spkg] contains backports of these fixes. With the exeption of one unrelated problem in sage/graphs/, the whole Sage test suite passes on Linux with `export MALLOC_CHECK_=yes`.