Google Groups Home
Help | Sign in
LinBox 1.1.5.rc2 valgrind report
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
mabshoff  
View profile
 More options Mar 10, 5:41 pm
From: mabshoff <Michael.Absh...@mathematik.uni-dortmund.de>
Date: Mon, 10 Mar 2008 14:41:37 -0700 (PDT)
Local: Mon, Mar 10 2008 5:41 pm
Subject: LinBox 1.1.5.rc2 valgrind report
Hello,

I build linbox 1.1.5.rc2 on a x86-64 linux box with

 * gmp 4.2.2
 * linbox 3.2.10.rc1
 * NTL 4.2.2
 * ATLAS 3.8

and did run valgrind over the whole test suite. I found various
issues. In many cases I only copied only a subset of the issues,
but some of them actually cause segfaults in Sage. The complete
logs are at

http://sage.math.washington.edu/home/mabshoff/linbox-1.1.5.rc2-vglog/

Cheers,

Michael

The details:

Commentator issues:

From test-ntl-lzz_p:

==13812== Invalid read of size 1
==13812==    at 0x4A1CD92: strlen (mc_replace_strmem.c:242)
==13812==    by 0x5E6B469: std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>

>(std::basic_ostream<char, std::char_traits<char> >&, char const*)

(in /usr/lib/libstdc++.so.6.0.8)
==13812==    by 0x409C05: LinBox::Commentator::stop(char const*, char
const*, char const*) (commentator.C:201)
==13812==    by 0x42125B: bool
runFieldTests<LinBox::NTL_zz_p>(LinBox::NTL_zz_p const&, char const*,
unsigned, unsigned long, bool) (test-field.h:1009)
==13812==    by 0x41000E: main (test-ntl-lzz_p.C:62)
==13812==  Address 0x64aa328 is 24 bytes inside a block of size 71
free'd
==13812==    at 0x4A1B5FC: operator delete(void*) (vg_replace_malloc.c:
342)
==13812==    by 0x5E78929: std::string::~string() (in /usr/lib/libstdc+
+.so.6.0.8)
==13812==    by 0x421138: bool
runFieldTests<LinBox::NTL_zz_p>(LinBox::NTL_zz_p const&, char const*,
unsigned, unsigned long, bool) (test-field.h:1003)
==13812==    by 0x41000E: main (test-ntl-lzz_p.C:62)

Also: test-modular-short [this seems to be the same issue]:

==13520== Invalid read of size 1
==13520==    at 0x4A1CD92: strlen (mc_replace_strmem.c:242)
==13520==    by 0x5E6B469: std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>

>(std::basic_ostream<char, std::char_traits<char> >&, char const*)

(in /usr/lib/libstdc++.so.6.0.8)
==13520==    by 0x4096A9: LinBox::Commentator::stop(char const*, char
const*, char const*) (commentator.C:201)
==13520==    by 0x41C75A: bool
testRanditerBasic<LinBox::Modular<short> >(LinBox::Modular<short>
const&, char const*, unsigned) (test-field.h:989)
==13520==    by 0x422153: bool
runBasicRingTests<LinBox::Modular<short> >(LinBox::Modular<short>
const&, char const*, unsigned, bool) (test-field.h:1038)
==13520==    by 0x422321: bool runFieldTests<LinBox::Modular<short>
>(LinBox::Modular<short> const&, char const*, unsigned, unsigned long,

bool) (test-field.h:1008)
==13520==    by 0x40F421: main (test-modular-short.C:71)
==13520==  Address 0x64b0e28 is 24 bytes inside a block of size 77
free'd
==13520==    at 0x4A1B5FC: operator delete(void*) (vg_replace_malloc.c:
342)
==13520==    by 0x5E78929: std::string::~string() (in /usr/lib/libstdc+
+.so.6.0.8)
==13520==    by 0x41C606: bool
testRanditerBasic<LinBox::Modular<short> >(LinBox::Modular<short>
const&, char const*, unsigned) (test-field.h:976)
==13520==    by 0x422153: bool
runBasicRingTests<LinBox::Modular<short> >(LinBox::Modular<short>
const&, char const*, unsigned, bool) (test-field.h:1038)
==13520==    by 0x422321: bool runFieldTests<LinBox::Modular<short>
>(LinBox::Modular<short> const&, char const*, unsigned, unsigned long,

bool) (test-field.h:1008)
==13520==    by 0x40F421: main (test-modular-short.C:71)

From test-commentator:

==10748==    ./test-commentator
==10748==
==10748== Conditional jump or move depends on uninitialised value(s)
==10748==    at 0x40472B:
LinBox::MessageClass::checkConfig(std::list<std::pair<unsigned long,
unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>

> >&, unsigned long, unsigned long) (commentator.C:635)

==10748==    by 0x40B24B: LinBox::MessageClass::isPrinted(unsigned
long, unsigned long, char const*) (commentator.C:586)
==10748==    by 0x40BA7B: LinBox::Commentator::isPrinted(unsigned
long, unsigned long, char const*, char const*) (commentator.C:360)
==10748==    by 0x40E607: LinBox::Commentator::start(char const*, char
const*, unsigned long) (commentator.C:128)
==10748==    by 0x40E7B2: runTestActivity(bool) (test-commentator.C:
52)
==10748==    by 0x40EAD1: testBriefReport() (test-commentator.C:143)
==10748==    by 0x40EBE6: main (test-commentator.C:177)

****************************************************************

test-isposdef leaks some serious memory:

==12374== LEAK SUMMARY:
==12374==    definitely lost: 736 bytes in 4 blocks.
==12374==    indirectly lost: 614,616 bytes in 25,631 blocks.
==12374==      possibly lost: 8 bytes in 1 blocks.
==12374==    still reachable: 64 bytes in 1 blocks.
==12374==         suppressed: 0 bytes in 0 blocks.

For example:

==12374== 409,600 bytes in 4 blocks are indirectly lost in loss record
13 of 13
==12374==    at 0x4A1C649: operator new(unsigned long)
(vg_replace_malloc.c:230)
==12374==    by 0x41E215:
__gnu_cxx::new_allocator<Integer>::allocate(unsigned long, void
const*) (new_allocator.h:88)
==12374==    by 0x41E23C: std::_Vector_base<Integer,
std::allocator<Integer> >::_M_allocate(unsigned long) (stl_vector.h:
127
)
==12374==    by 0x41E26E: std::_Vector_base<Integer,
std::allocator<Integer> >::_Vector_base(unsigned long,
std::allocator<I
nteger> const&) (stl_vector.h:113)
==12374==    by 0x420B05: std::vector<Integer, std::allocator<Integer>

>::vector(unsigned long, Integer const&, std::allocat

or<Integer> const&) (stl_vector.h:216)
==12374==    by 0x420BD6:
LinBox::DenseMatrixBase<Integer>::DenseMatrixBase(unsigned long,
unsigned long) (dense.h:101)
==12374==    by 0x424A16:
LinBox::DenseMatrix<LinBox::PID_integer>::DenseMatrix(LinBox::PID_integer
const&, unsigned long, u
nsigned long) (dense.h:98)
==12374==    by 0x43045C: void
LinBox::MatrixHom::map<LinBox::PID_integer,
std::pair<std::vector<unsigned long, std::allocat
or<unsigned long> >, std::vector<Integer, std::allocator<Integer> > >,
LinBox::PID_integer>(LinBox::DenseMatrix<LinBox::PID_
integer>*&, LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<Integer, std::allocator<Integer> > > > const&,
LinBox::PID_integer const&) (matrix-hom.h:232)
==12374==    by 0x44B2D6: bool
LinBox::isPositiveDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vector<un
signed long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > > >(LinBox::SparseMatrix<LinB
ox::PID_integer, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<Integer, std::allocator<I
nteger> > > > const&, LinBox::RingCategories::IntegerTag const&,
LinBox::BlasEliminationTraits const&) (is-positive-definite
.h:116)
==12374==    by 0x44B31B: bool
LinBox::isPositiveDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vector<un
signed long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > > >(LinBox::SparseMatrix<LinB
ox::PID_integer, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<Integer, std::allocator<I
nteger> > > > const&, LinBox::RingCategories::IntegerTag const&,
LinBox::EliminationSpecifier const&) (is-positive-definite.
h:82)
==12374==    by 0x44B3EE: bool
LinBox::isPositiveDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vector<un
signed long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > > >(LinBox::SparseMatrix<LinB
ox::PID_integer, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<Integer, std::allocator<I
nteger> > > > const&, LinBox::RingCategories::IntegerTag const&,
LinBox::HybridSpecifier const&) (is-positive-definite.h:68)
==12374==    by 0x44B431: bool
LinBox::isPositiveDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vector<un
signed long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > >, LinBox::HybridSpecifier>(L
inBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<I
nteger, std::allocator<Integer> > > > const&, LinBox::HybridSpecifier
const&) (is-positive-definite.h:35)

****************************************************************

Givaro related issues:

test-givaro-zpz:

==10917== Conditional jump or move depends on uninitialised value(s)
==10917==    at 0x412BE5: ZpzDom<Std16>::init(short&, long) const
(givzpz16std.inl:341)
==10917==    by 0x412CD2: ZpzDom<Std16>::assign(short&, long) const
(givzpz16std.inl:393)
==10917==    by 0x412CFB: ZpzDom<Std16>::assign(short&, short) const
(givzpz16std.inl:409)
==10917==    by 0x442687: bool
testRandomIteratorStep<LinBox::GivaroZpz<Std16>

>(LinBox::GivaroZpz<Std16> const&, char const*, unsigned, unsigned,

unsigned) (test-field.h:1123)
==10917==    by 0x443AB9: bool
testRandomIterator<LinBox::GivaroZpz<Std16> >(LinBox::GivaroZpz<Std16>
const&, char const*, unsigned, unsigned, unsigned) (test-field.h:1069)
==10917==    by 0x41037D: main (test-givaro-zpz.C:92)

test-givaro-zpzuns:

==11321== Conditional jump or move depends on uninitialised value(s)
==11321==    at 0x4122A7: ZpzDom<Unsigned32>::assign(unsigned&, long)
const (givzpz32uns.inl:397)
==11321==    by 0x412314: ZpzDom<Unsigned32>::assign(unsigned&,
unsigned) const (givzpz32uns.inl:414)
==11321==    by 0x42CEE8: bool
testRandomIteratorStep<LinBox::GivaroZpz<Unsigned32>

>(LinBox::GivaroZpz<Unsigned32> const&,

char const*, unsigned, unsigned, unsigned) (test-field.h:1123)
==11321==    by 0x42E30D: bool
testRandomIterator<LinBox::GivaroZpz<Unsigned32>
>(LinBox::GivaroZpz<Unsigned32> const&, char

 const*, unsigned, unsigned, unsigned) (test-field.h:1069)
==11321==    by 0x410167: main (test-givaro-zpzuns.C:84)

==11321== Invalid read of size 2
==11321==    at 0x43EF1B:
...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "LinBox 1.1.5.rc2-rc2912 valgrind report" by mabshoff
mabshoff  
View profile
 More options Mar 12, 4:07 am
From: mabshoff <Michael.Absh...@mathematik.uni-dortmund.de>
Date: Wed, 12 Mar 2008 01:07:20 -0700 (PDT)
Local: Wed, Mar 12 2008 4:07 am
Subject: Re: LinBox 1.1.5.rc2-rc2912 valgrind report
I reran all the tests using linbox 1.1.5rc2-rc2912

Clement did fix a lot of the leaks and also a couple other
issues. I have left a number of NTL related memory issues
out of this summary since those are at least partially caused
by NTL internals. I hopefully will have time to track those
down soon since those have annoyed me in Sage enough to
finally do something about them.

Overall great progress since 1.1.5.rc2!

Cheers,

Michael

test-rational-solver, test-rational-solver-adaptive

==13731== Invalid read of size 1
==13731==    at 0x4A1CDC2: strlen (mc_replace_strmem.c:242)
==13731==    by 0x5E6B469: std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>

>(std:

:basic_ostream<char, std::char_traits<char> >&, char const*) (in /usr/
lib/libstdc++.so.6.0.8)
==13731==    by 0x409ACD: LinBox::Commentator::stop(char const*, char
const*, char const*) (commentator.C:201)
==13731==    by 0x45C5E7: bool testRandomSolve<LinBox::PID_integer,
LinBox::Modular<int>, std::vector<Integer, std::allocato
r<Integer> > >(LinBox::PID_integer const&, LinBox::Modular<int>
const&, LinBox::VectorStream<std::vector<Integer, std::alloc
ator<Integer> > >&, LinBox::VectorStream<std::vector<Integer,
std::allocator<Integer> > >&) (test-rational-solver.C:139)
==13731==    by 0x40FB1D: main (test-rational-solver.C:172)
==13731==  Address 0x64a8790 is 24 bytes inside a block of size 67
free'd
==13731==    at 0x4A1B62C: operator delete(void*) (vg_replace_malloc.c:
342)
==13731==    by 0x5E78929: std::string::~string() (in /usr/lib/libstdc+
+.so.6.0.8)
==13731==    by 0x45BDC6: bool testRandomSolve<LinBox::PID_integer,
LinBox::Modular<int>, std::vector<Integer, std::allocato
r<Integer> > >(LinBox::PID_integer const&, LinBox::Modular<int>
const&, LinBox::VectorStream<std::vector<Integer, std::alloc
ator<Integer> > >&, LinBox::VectorStream<std::vector<Integer,
std::allocator<Integer> > >&) (test-rational-solver.C:28)
==13731==    by 0x40FB1D: main (test-rational-solver.C:172)

################################################################

test-givaro-zpz

==23627== Invalid read of size 2
==23627==    at 0x46A6DB: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:92)
==23627==    by 0x42985E: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==23627==    by 0x4107B6: main (test-givaro-zpz.C:117)
==23627==  Address 0x6c9d70a is 0 bytes after a block of size 202
alloc'd
==23627==    at 0x4A1C2F7: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==23627==    by 0x46A4DB: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:20)
==23627==    by 0x42985E: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==23627==    by 0x4107B6: main (test-givaro-zpz.C:117)

################################################################

test-givaro-zpzuns (very similar to the previous error)

==11587== Invalid read of size 2
==11587==    at 0x43F7BB: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:92)
==11587==    by 0x42179A: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==11587==    by 0x410546: main (test-givaro-zpzuns.C:104)
==11587==  Address 0x76fbd2a is 0 bytes after a block of size 202
alloc'd
==11587==    at 0x4A1C2F7: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==11587==    by 0x43F5BB: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:20)
==11587==    by 0x42179A: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==11587==    by 0x410546: main (test-givaro-zpzuns.C:104)

################################################################

test-zero-one

==22836== Conditional jump or move depends on uninitialised value(s)
==22836==    at 0x416E22: LinBox::ZeroOne<LinBox::Modular<unsigned>

>::_part(unsigned long, unsigned long, int&) const (zero

-one.inl:241)
==22836==    by 0x417103: LinBox::ZeroOne<LinBox::Modular<unsigned>
>::_qsort(unsigned long, unsigned long, int&) const (zer

o-one.inl:215)
==22836==    by 0x417172: LinBox::ZeroOne<LinBox::Modular<unsigned>
>::rowSort() const (zero-one.inl:193)

==22836==    by 0x4173CE: std::vector<unsigned,
std::allocator<unsigned> >& LinBox::ZeroOne<LinBox::Modular<unsigned>
>::app

lySpecialization<std::vector<unsigned, std::allocator<unsigned> >,
std::vector<unsigned, std::allocator<unsigned> > >(std::v
ector<unsigned, std::allocator<unsigned> >&, std::vector<unsigned,
std::allocator<unsigned> > const&, LinBox::ZeroOne<LinBox
::Modular<unsigned> >::Mod32Field const&) const (zero-one.inl:328)
==22836==    by 0x417641: std::vector<unsigned,
std::allocator<unsigned> >& LinBox::ZeroOne<LinBox::Modular<unsigned>
>::app

ly<std::vector<unsigned, std::allocator<unsigned> >,
std::vector<unsigned, std::allocator<unsigned> >
>(std::vector<unsigned

, std::allocator<unsigned> >&, std::vector<unsigned,
std::allocator<unsigned> > const&) const (zero-one.h:71)
==22836==    by 0x40B3B1: bool
testLinearity<LinBox::Modular<unsigned>,
LinBox::ZeroOne<LinBox::Modular<unsigned> >, std::ve
ctor<unsigned, std::allocator<unsigned> >
>(LinBox::Modular<unsigned>&,

LinBox::ZeroOne<LinBox::Modular<unsigned> >&, LinBox
::VectorStream<std::vector<unsigned, std::allocator<unsigned> > >&,
LinBox::VectorStream<std::vector<unsigned, std::allocato
r<unsigned> > >&) (test-blackbox.h:173)
==22836==    by 0x40BD29: bool
testBlackbox<LinBox::ZeroOne<LinBox::Modular<unsigned> >
>(LinBox::ZeroOne<LinBox::Modular<un

signed> >&) (test-blackbox.h:258)
==22836==    by 0x40D956: main (test-zero-one.C:53)

################################################################

Small leaks in test-gmp-rational:

==10938== LEAK SUMMARY:
==10938==    definitely lost: 57 bytes in 3 blocks.
==10938==      possibly lost: 0 bytes in 0 blocks.
==10938==    still reachable: 64 bytes in 1 blocks.
==10938==         suppressed: 0 bytes in 0 blocks.

==10938== 8 bytes in 1 blocks are definitely lost in loss record 1 of
4
==10938==    at 0x4A1BE1B: malloc (vg_replace_malloc.c:207)
==10938==    by 0x5BA2D58: __gmp_default_allocate (in /scratch/
mabshoff/gmp-4.2.2-bin/lib/libgmp.so.3.4.2)
==10938==    by 0x5BB1717: __gmpz_init (in /scratch/mabshoff/gmp-4.2.2-
bin/lib/libgmp.so.3.4.2)
==10938==    by 0x41FC18: LinBox::GMPRationalField::convert(Integer&,
LinBox::GMPRationalElement const&) const (gmp-rational.h:146)
==10938==    by 0x42093A: bool testField<LinBox::GMPRationalField
const>(LinBox::GMPRationalField const&, char const*, bool) (test-
field.h:125)
==10938==    by 0x422B42: bool
runBasicRingTests<LinBox::GMPRationalField>(LinBox::GMPRationalField
const&, char const*, unsigned, bool) (test-field.h:1053)
==10938==    by 0x422F86: bool
runFieldTests<LinBox::GMPRationalField>(LinBox::GMPRationalField
const&, char const*, unsigned, unsigned long, bool) (test-field.h:
1034)
==10938==    by 0x40F8BB: main (test-gmp-rational.C:50)

################################################################

test-ispossemidef still leaks rather badly:

==12100== LEAK SUMMARY:
==12100==    definitely lost: 736 bytes in 4 blocks.
==12100==    indirectly lost: 614,624 bytes in 25,632 blocks.
==12100==      possibly lost: 0 bytes in 0 blocks.
==12100==    still reachable: 64 bytes in 1 blocks.
==12100==         suppressed: 0 bytes in 0 blocks.

Clement told me in IRC that he looked at it, but couldn't find
anything yet.

################################################################

test-commentator

==27743== Conditional jump or move depends on uninitialised value(s)
==27743==    at 0x40472B:
LinBox::MessageClass::checkConfig(std::list<std::pair<unsigned long,
unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>

> >&, unsigned long, unsigned long) (commentator.C:635)

==27743==    by 0x40B24B: LinBox::MessageClass::isPrinted(unsigned
long, unsigned long, char const*) (commentator.C:586)
==27743==    by 0x40BA7B: LinBox::Commentator::isPrinted(unsigned
long, unsigned long, char const*, char const*) (commentator.C:360)
==27743==    by 0x40E607: LinBox::Commentator::start(char const*, char
const*, unsigned long) (commentator.C:128)
==27743==    by 0x40E7B2: runTestActivity(bool) (test-commentator.C:
52)
==27743==    by 0x40EAD1: testBriefReport() (test-commentator.C:143)
==27743==    by 0x40EBE6: main (test-commentator.C:177)

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "LinBox 1.1.5.rc2-rc2916 valgrind report" by mabshoff
mabshoff  
View profile
 More options Mar 13, 3:32 am
From: mabshoff <Michael.Absh...@mathematik.uni-dortmund.de>
Date: Thu, 13 Mar 2008 00:32:44 -0700 (PDT)
Local: Thurs, Mar 13 2008 3:32 am
Subject: Re: LinBox 1.1.5.rc2-rc2916 valgrind report
Hello list,

I reran all the tests using linbox 1.1.5rc2-rc2916: Overall
much progress, i.e. the huge leaks and the segfault in
test-zero-one on Solaris has probably been fixed. There
are still four, five  small issues left that I listed below.
So overall very nice work Clement :)

Memory wise the issues left are overwhelmingly in Givaro
and/or NTL, so I will start poking around there hopefully
soon.

Re r2916: It doesn't fix all Solaris related issues, i.e. _A
is still a problem. I should be building on Solaris some
time today, so I can come up with a patch in case I find
some issues.

Overall you can see the progress from the total size of
all the valgrind logs for all the tests:

1.5M    linbox-1.1.5.rc2-vglog
804K    linbox-1.1.5.rc2-r2911-vglog
788K    linbox-1.1.5.rc2-r2912-vglog
700K    linbox-1.1.5.rc2-r2916-vglog

All the logs can be found on sage.math, i.e.

http://sage.math.washington.edu/home/mabshoff/linbox-1.1.5.rc2-r2916-...

Cheers,

Michael

################################################################

test-givaro-zpzuns and test-givaro-zpz

==1498== Invalid read of size 2
==1498==    at 0x43F83B: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:92)
==1498==    by 0x421820: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==1498==    by 0x410578: main (test-givaro-zpzuns.C:108)
==1498==  Address 0x8756e52 is 0 bytes after a block of size 202
alloc'd
==1498==    at 0x4A1C2F7: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==1498==    by 0x43F63B: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:20)
==1498==    by 0x421820: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==1498==    by 0x410578: main (test-givaro-zpzuns.C:108)

################################################################

test-commentator

==31856== Conditional jump or move depends on uninitialised value(s)
==31856==    at 0x40472B:
LinBox::MessageClass::checkConfig(std::list<std::pair<unsigned long,
unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>

> >&, unsigned long, unsigned long) (commentator.C:635)

==31856==    by 0x40B24B: LinBox::MessageClass::isPrinted(unsigned
long, unsigned long, char const*) (commentator.C:586)
==31856==    by 0x40BA7B: LinBox::Commentator::isPrinted(unsigned
long, unsigned long, char const*, char const*) (commentator.C:360)
==31856==    by 0x40E607: LinBox::Commentator::start(char const*, char
const*, unsigned long) (commentator.C:128)
==31856==    by 0x40E7B2: runTestActivity(bool) (test-commentator.C:
52)
==31856==    by 0x40EAD1: testBriefReport() (test-commentator.C:143)
==31856==    by 0x40EBE6: main (test-commentator.C:177)

################################################################

Some small leaks in test-gmp-rational left:

==32126== LEAK SUMMARY:
==32126==    definitely lost: 57 bytes in 3 blocks.
==32126==      possibly lost: 0 bytes in 0 blocks.
==32126==    still reachable: 64 bytes in 1 blocks.
==32126==         suppressed: 0 bytes in 0 blocks.

For example:

==32126== 8 bytes in 1 blocks are definitely lost in loss record 1 of
4
==32126==    at 0x4A1BE1B: malloc (vg_replace_malloc.c:207)
==32126==    by 0x5BA2D58: __gmp_default_allocate (in /scratch/
mabshoff/gmp-4.2.2-bin/lib/libgmp.so.3.4.2)
==32126==    by 0x5BB1717: __gmpz_init (in /scratch/mabshoff/gmp-4.2.2-
bin/lib/libgmp.so.3.4.2)
==32126==    by 0x41FC18: LinBox::GMPRationalField::convert(Integer&,
LinBox::GMPRationalElement const&) const (gmp-rational
.h:146)
==32126==    by 0x42093A: bool testField<LinBox::GMPRationalField
const>(LinBox::GMPRationalField const&, char const*, bool)
 (test-field.h:125)
==32126==    by 0x422B42: bool
runBasicRingTests<LinBox::GMPRationalField>(LinBox::GMPRationalField
const&, char const*, uns
igned, bool) (test-field.h:1053)
==32126==    by 0x422F86: bool
runFieldTests<LinBox::GMPRationalField>(LinBox::GMPRationalField
const&, char const*, unsigne
d, unsigned long, bool) (test-field.h:1034)
==32126==    by 0x40F8BB: main (test-gmp-rational.C:50)

################################################################

test-rational-solver-adaptive, test-rational-solver:

==19625== Invalid read of size 1
==19625==    at 0x4A1CDC2: strlen (mc_replace_strmem.c:242)
==19625==    by 0x5E6B469: std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>

>(std::basic_ostream<char, std::char_traits<char> >&, char const*)

(in /usr/lib/libstdc++.so.6.0.8)
==19625==    by 0x409ACD: LinBox::Commentator::stop(char const*, char
const*, char const*) (commentator.C:201)
==19625==    by 0x45C6D7: bool testRandomSolve<LinBox::PID_integer,
LinBox::Modular<int>, std::vector<Integer, std::allocator<Integer> >
>(LinBox::PID_integer const&, LinBox::Modular<int> const&,

LinBox::VectorStream<std::vector<Integer, std::allocator<Integer> >
>&, LinBox::VectorStream<std::vector<Integer, std::allocator<Integer>
> >&) (test-rational-solver-adaptive.C:138)

==19625==    by 0x40FB1D: main (test-rational-solver-adaptive.C:172)
==19625==  Address 0x64a8790 is 24 bytes inside a block of size 67
free'd
==19625==    at 0x4A1B62C: operator delete(void*) (vg_replace_malloc.c:
342)
==19625==    by 0x5E78929: std::string::~string() (in /usr/lib/libstdc+
+.so.6.0.8)
==19625==    by 0x45BFD2: bool testRandomSolve<LinBox::PID_integer,
LinBox::Modular<int>, std::vector<Integer, std::allocator<Integer> >
>(LinBox::PID_integer const&, LinBox::Modular<int> const&,

LinBox::VectorStream<std::vector<Integer, std::allocator<Integer> >
>&, LinBox::VectorStream<std::vector<Integer, std::allocator<Integer>
> >&) (test-rational-solver-adaptive.C:27)

==19625==    by 0x40FB1D: main (test-rational-solver-adaptive.C:172)

################################################################

test-ntl-toeplitz: various NTL related deallocation issues:

==1540== LEAK SUMMARY:
==1540==    definitely lost: 0 bytes in 0 blocks.
==1540==      possibly lost: 432 bytes in 9 blocks.
==1540==    still reachable: 56,727 bytes in 29 blocks.
==1540==         suppressed: 0 bytes in 0 blocks.

The baseline NTL still reachable memory seems to be about 6
kb in 18 blocks, maybe a little less.

For example the following might still be deallocatable:

==1540== 32,768 bytes in 1 blocks are still reachable in loss record
33 of 33
==1540==    at 0x4A1BE1B: malloc (vg_replace_malloc.c:207)
==1540==    by 0x47C543: NTL::BitReverseCopy(long*, long const*, long)
(in /scratch/mabshoff/linbox/tests/mu/test-ntl-toeplitz)
==1540==    by 0x47C669: NTL::FFT(long*, long const*, long, long, long
const*) (in /scratch/mabshoff/linbox/tests/mu/test-ntl-toeplitz)
==1540==    by 0x444652: NTL::ToFFTRep(NTL::FFTRep&, NTL::ZZ_pX
const&, long, long, long) (in /scratch/mabshoff/linbox/tests/mu/test-
ntl-toeplitz)
==1540==    by 0x4460F3: NTL::FFTMul(NTL::ZZ_pX&, NTL::ZZ_pX const&,
NTL::ZZ_pX const&) (in /scratch/mabshoff/linbox/tests/mu/test-ntl-
toeplitz)
==1540==    by 0x4463E1: NTL::mul(NTL::ZZ_pX&, NTL::ZZ_pX const&,
NTL::ZZ_pX const&) (in /scratch/mabshoff/linbox/tests/mu/test-ntl-
toeplitz)
==1540==    by 0x419F92: NTL::operator*(NTL::ZZ_pX const&, NTL::ZZ_pX
const&) (ZZ_pX.h:442)
==1540==    by 0x41C619:
LinBox::UnparametricField<NTL::ZZ_pX>::mul(NTL::ZZ_pX&, NTL::ZZ_pX
const&, NTL::ZZ_pX const&) const (unparametric.h:177)
==1540==    by 0x41C7F8: std::vector<NTL::ZZ_p,
std::allocator<NTL::ZZ_p> >& LinBox::Toeplitz<LinBox::NTL_ZZ_p,
LinBox::NTL_ZZ_pX>::applyTranspose<std::vector<NTL::ZZ_p,
std::allocator<NTL::ZZ_p> >, std::vector<NTL::ZZ_p,
std::allocator<NTL::ZZ_p> > >(std::vector<NTL::ZZ_p,
std::allocator<NTL::ZZ_p> >&, std::vector<NTL::ZZ_p,
std::allocator<NTL::ZZ_p> > const&) const (toeplitz.inl:366)
==1540==    by 0x4118F2: main (test-ntl-toeplitz.C:91)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Clement Pernet  
View profile
 More options Mar 13, 1:45 pm
From: Clement Pernet <clement.per...@gmail.com>
Date: Thu, 13 Mar 2008 11:45:48 -0600
Local: Thurs, Mar 13 2008 1:45 pm
Subject: Re: [linbox-use] Re: LinBox 1.1.5.rc2-rc2916 valgrind report
Hi,

here is my last status report on these bugs:

> ################################################################

> test-givaro-zpzuns and test-givaro-zpz

This was a bug in givaro:
I fixed it upstream.
The patch is here:
http://sage.math.washington.edu/home/pernet/Patches/givarozpz16table1...
I also made a givaro-3.2.10rc2 tarball:
http://sage.math.washington.edu/home/pernet/givaro-3.2.10rc2.tar.gz

> ################################################################

> test-commentator

I gave up on this one, since the commentator gives me headache.
However, this code is not ran when compiling with -DDISABLE_COMMENTATOR

These leaks really look to be NTL's fault. So I did not look at it for
the moment.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Saunders  
View profile
 More options Mar 13, 4:25 pm
From: David Saunders <saund...@udel.edu>
Date: Thu, 13 Mar 2008 16:25:45 -0400
Local: Thurs, Mar 13 2008 4:25 pm
Subject: Re: [linbox-use] Re: LinBox 1.1.5.rc2-rc2916 valgrind report
This is excellent.  Michael, thanks for making trouble (very valuable!)
and Clement thanks for the good fight!

Regarding the commentator, there is value in it but it is due for an
overhaul.  I have some ideas about that.  To give a hint, the
commentator tries to be too many things for too many purposes, with the
result that none are served well.  It can be modularized and simplified.
  In particular, algorithm writer's interface to the commentator must be
dead simple.  Algorithm writers have many other things on their minds.
Stack sniffing rather than algorithm writer input can handle nesting.
Wall clock monitoring can control output volume rather than multiple
categories of importance and message type.  Thus user can direct with a
single <interval> parameter: "show me only the most important single
message you have from each <interval> seconds."  In a separate thread,
semi-intelligent methods can filter the commentator message stream to
meet that goal, etc.

One suggestion I have is to make the disabled commentator the default.
One only gets commentator active by compiling with -DENABLE_COMMENTATOR.

-dave


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "LinBox 1.1.5.rc2-rc2920 valgrind report" by mabshoff
mabshoff  
View profile
 More options Mar 13, 4:46 pm
From: mabshoff <Michael.Absh...@mathematik.uni-dortmund.de>
Date: Thu, 13 Mar 2008 13:46:12 -0700 (PDT)
Local: Thurs, Mar 13 2008 4:46 pm
Subject: Re: LinBox 1.1.5.rc2-rc2920 valgrind report
Hello list,

I reran all the tests using linbox 1.1.5rc2-rc2920: Much
progress again thanks to Clement.

Work on Solaris is coming up.

http://sage.math.washington.edu/home/mabshoff/linbox-1.1.5.rc2-r2920-...

Cheers,

Michael

################################################################

test-commentator

==31856== Conditional jump or move depends on uninitialised value(s)
==31856==    at 0x40472B:
LinBox::MessageClass::checkConfig(std::list<std::pair<unsigned long,
unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>

> >&, unsigned long, unsigned long) (commentator.C:635)

==31856==    by 0x40B24B: LinBox::MessageClass::isPrinted(unsigned
long, unsigned long, char const*) (commentator.C:586)
==31856==    by 0x40BA7B: LinBox::Commentator::isPrinted(unsigned
long, unsigned long, char const*, char const*) (commentator.C:360)
==31856==    by 0x40E607: LinBox::Commentator::start(char const*, char
const*, unsigned long) (commentator.C:128)
==31856==    by 0x40E7B2: runTestActivity(bool) (test-commentator.C:
52)
==31856==    by 0x40EAD1: testBriefReport() (test-commentator.C:143)
==31856==    by 0x40EBE6: main (test-commentator.C:177)

Clement gave up on this one, so I might have to dig myself :)

################################################################

Some small leaks in test-gmp-rational left, improved relative to
r2916:

==20500== LEAK SUMMARY:
==20500==    definitely lost: 16 bytes in 2 blocks.
==20500==      possibly lost: 0 bytes in 0 blocks.
==20500==    still reachable: 64 bytes in 1 blocks.
==20500==         suppressed: 0 bytes in 0 blocks

################################################################

Issues in test-givaro-zpzuns and test-givaro-zpz are gone with
the new Givaro.

################################################################

test-rational-solver-adaptive, test-rational-solver (still present):

==19625== Invalid read of size 1
==19625==    at 0x4A1CDC2: strlen (mc_replace_strmem.c:242)
==19625==    by 0x5E6B469: std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>

>(std::basic_ostream<char, std::char_traits<char> >&, char const*)

(in /usr/lib/libstdc++.so.6.0.8)
==19625==    by 0x409ACD: LinBox::Commentator::stop(char const*, char
const*, char const*) (commentator.C:201)
==19625==    by 0x45C6D7: bool testRandomSolve<LinBox::PID_integer,
LinBox::Modular<int>, std::vector<Integer, std::allocator<Integer> >
>(LinBox::PID_integer const&, LinBox::Modular<int> const&,

LinBox::VectorStream<std::vector<Integer, std::allocator<Integer> >
>&, LinBox::VectorStream<std::vector<Integer, std::allocator<Integer>
> >&) (test-rational-solver-adaptive.C:138)

==19625==    by 0x40FB1D: main (test-rational-solver-adaptive.C:172)
==19625==  Address 0x64a8790 is 24 bytes inside a block of size 67
free'd
==19625==    at 0x4A1B62C: operator delete(void*) (vg_replace_malloc.c:
342)
==19625==    by 0x5E78929: std::string::~string() (in /usr/lib/libstdc+
+.so.6.0.8)
==19625==    by 0x45BFD2: bool testRandomSolve<LinBox::PID_integer,
LinBox::Modular<int>, std::vector<Integer, std::allocator<Integer> >
>(LinBox::PID_integer const&, LinBox::Modular<int> const&,

LinBox::VectorStream<std::vector<Integer, std::allocator<Integer> >
>&, LinBox::VectorStream<std::vector<Integer, std::allocator<Integer>
> >&) (test-rational-solver-adaptive.C:27)

==19625==    by 0x40FB1D: main (test-rational-solver-adaptive.C:172)

The following two code snippets at fault here:

        str << "Testing Nonsingular Random Diagonal solve ";

        commentator.start (str.str ().c_str (),
"testNonsingularRandomDiagonalSolve");

and

        str << "Testing Nonsingular Random Diagonal solve ";

        commentator.start (str.str ().c_str
(),"testNonsingularRandomDiagonalSolve", stream1.size());//
"testNonsingularRand
omMatrixSolve", stream1.m ());

Since Clement fixed the same bug in two other places already I
won't post a patch here so he will get credit [and I am lazy, too] :)

################################################################

I will skip over Givaro and NTL memleak issues until I do
some more digging there.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mabshoff  
View profile
 More options Mar 13, 5:35 pm
From: mabshoff <Michael.Absh...@mathematik.uni-dortmund.de>
Date: Thu, 13 Mar 2008 14:35:27 -0700 (PDT)
Local: Thurs, Mar 13 2008 5:35 pm
Subject: Re: LinBox 1.1.5.rc2-rc2920 valgrind report

On Mar 13, 9:46 pm, mabshoff <Michael.Absh...@mathematik.uni-

dortmund.de> wrote:
> Hello list,

<SNIP>

Ok, I am doing my share, too. Clement is in some talk right now, so
here are the two trivial fixes for the above issue:

http://fsmath.mathematik.uni-dortmund.de/~mabshoff/patches/linbox-1.1...
http://fsmath.mathematik.uni-dortmund.de/~mabshoff/patches/linbox-1.1...

I am now working on Solaris to make sure it compiles there. Clement
suggested doing an rc3 afterwards.

Cheers,

Michael


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.