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: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:92)
==11321== by 0x42164A: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==11321== by 0x4103F6: main (test-givaro-zpzuns.C:104)
==11321== Address 0x7704cf2 is 0 bytes after a block of size 202
alloc'd
==11321== at 0x4A1C2C7: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==11321== by 0x43ED1B: ZpzDom<Log16>::ZpzDom(unsigned short)
(givzpz16table1.C:20)
==11321== by 0x42164A: LinBox::GivaroZpz<Log16>::GivaroZpz(Integer
const&) (givaro-zpz.h:102)
==11321== by 0x4103F6: main (test-givaro-zpzuns.C:104)
****************************************************************
test-smith-form-iliopoulos loses a good chunk of memory in NTL. For
example:
==14126== 44,800 bytes in 400 blocks are indirectly lost in loss
record 36 of 36
==14126== at 0x4A1BDEB: malloc (vg_replace_malloc.c:207)
==14126== by 0x4392FE: _ntl_zsetlength (in /scratch/mabshoff/
linbox-1.1.5rc2/tests/mu/test-smith-form-iliopoulos)
==14126== by 0x421F09: NTL::ZZ::ZZ(NTL::INIT_SIZE_STRUCT const&,
long) (ZZ.h:49)
==14126== by 0x421F35: NTL::ZZ_p::ZZ_p(NTL::ZZ_p const&) (ZZ_p.h:
155)
==14126== by 0x421FA0: void std::_Construct<NTL::ZZ_p,
NTL::ZZ_p>(NTL::ZZ_p*, NTL::ZZ_p const&) (stl_construct.h:81)
==14126== by 0x421FF7: void
std::__uninitialized_fill_n_aux<NTL::ZZ_p*, unsigned long,
NTL::ZZ_p>(NTL::ZZ_p*, unsigned long, NTL::ZZ_p const&, __false_type)
(stl_uninitialized.h:194)
==14126== by 0x422075: void std::uninitialized_fill_n<NTL::ZZ_p*,
unsigned long, NTL::ZZ_p>(NTL::ZZ_p*, unsigned long, NTL::ZZ_p const&)
(stl_uninitialized.h:218)
==14126== by 0x4220A0: void
std::__uninitialized_fill_n_a<NTL::ZZ_p*, unsigned long, NTL::ZZ_p,
NTL::ZZ_p>(NTL::ZZ_p*, unsigned long, NTL::ZZ_p const&,
std::allocator<NTL::ZZ_p>) (stl_uninitialized.h:310)
==14126== by 0x4220FA: std::vector<NTL::ZZ_p,
std::allocator<NTL::ZZ_p> >::vector(unsigned long, NTL::ZZ_p const&,
std::allocator<NTL::ZZ_p> const&) (stl_vector.h:218)
==14126== by 0x422199:
LinBox::DenseMatrixBase<NTL::ZZ_p>::DenseMatrixBase(unsigned long,
unsigned long) (dense.h:101)
==14126== by 0x422516:
LinBox::DenseMatrix<LinBox::PIR_ntl_ZZ_p>::DenseMatrix(LinBox::PIR_ntl_ZZ_p
const&, unsigned long, unsigned long) (dense.h:98)
==14126== by 0x42ECB3:
LinBox::DenseMatrix<LinBox::NTL_ZZ>::rebind<LinBox::PIR_ntl_ZZ_p>::operator()
(LinBox::DenseMatrix<LinBox::PIR_ntl_ZZ_p>*&,
LinBox::DenseMatrix<LinBox::NTL_ZZ> const&, LinBox::PIR_ntl_ZZ_p
const&) (dense.h:176)
==14126== LEAK SUMMARY:
==14126== definitely lost: 176 bytes in 1 blocks.
==14126== indirectly lost: 48,048 bytes in 407 blocks.
==14126== possibly lost: 2,560 bytes in 22 blocks.
==14126== still reachable: 2,159 bytes in 5 blocks.
==14126== suppressed: 0 bytes in 0 blocks.
****************************************************************
test-moore-penrose leaks some serious memory:
==13526== LEAK SUMMARY:
==13526== definitely lost: 33,128 bytes in 303 blocks.
==13526== indirectly lost: 362,072 bytes in 1,620 blocks.
==13526== possibly lost: 0 bytes in 0 blocks.
==13526== still reachable: 64 bytes in 1 blocks.
==13526== suppressed: 0 bytes in 0 blocks.
==13526== 150,440 (11,200 direct, 139,240 indirect) bytes in 100
blocks are definitely lost in loss record 41 of 43
==13526== at 0x4A1C649: operator new(unsigned long)
(vg_replace_malloc.c:230)
==13526== by 0x4357DE:
LinBox::MoorePenrose<LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > >
>::MoorePenrose(LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > > const*, unsigned
long) (moore-penrose.h:86)
==13526== by 0x413D11: bool
testRandomApply1<LinBox::Modular<unsigned>, std::vector<unsigned,
std::allocator<unsigned> >, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >(LinBox::Modular<unsigned>&, unsigned
long, unsigned long, unsigned long, unsigned, double,
LinBox::VectorStream<std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >&,
LinBox::VectorStream<std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >&,
LinBox::VectorStream<std::vector<unsigned, std::allocator<unsigned> >
>&) (test-moore-penrose.C:252)
==13526== by 0x41472B: main (test-moore-penrose.C:364)
==13526==
==13526==
==13526== 150,440 (11,200 direct, 139,240 indirect) bytes in 100
blocks are definitely lost in loss record 42 of 43
==13526== at 0x4A1C649: operator new(unsigned long)
(vg_replace_malloc.c:230)
==13526== by 0x435829:
LinBox::MoorePenrose<LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > >
>::MoorePenrose(LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > > const*, unsigned
long) (moore-penrose.h:87)
==13526== by 0x413D11: bool
testRandomApply1<LinBox::Modular<unsigned>, std::vector<unsigned,
std::allocator<unsigned> >, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >(LinBox::Modular<unsigned>&, unsigned
long, unsigned long, unsigned long, unsigned, double,
LinBox::VectorStream<std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >&,
LinBox::VectorStream<std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >&,
LinBox::VectorStream<std::vector<unsigned, std::allocator<unsigned> >
>&) (test-moore-penrose.C:252)
==13526== by 0x41472B: main (test-moore-penrose.C:364)
==13526== 40,000 bytes in 100 blocks are indirectly lost in loss
record 43 of 43
==13526== at 0x4A1C649: operator new(unsigned long)
(vg_replace_malloc.c:230)
==13526== by 0x42B6BC:
__gnu_cxx::new_allocator<unsigned>::allocate(unsigned long, void
const*) (new_allocator.h:88)
==13526== by 0x42B6E4: std::_Vector_base<unsigned,
std::allocator<unsigned> >::_M_allocate(unsigned long) (stl_vector.h:
127)
==13526== by 0x42C40A: std::_Vector_base<unsigned,
std::allocator<unsigned> >::_Vector_base(unsigned long,
std::allocator<unsigned> const&) (stl_vector.h:113)
==13526== by 0x42C835: std::vector<unsigned,
std::allocator<unsigned> >::vector(unsigned long, unsigned const&,
std::allocator<unsigned> const&) (stl_vector.h:216)
==13526== by 0x4354B4:
LinBox::Submatrix<LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > >,
LinBox::VectorCategories::DenseVectorTag>::Submatrix(LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > > const*, unsigned
long, unsigned long, unsigned long, unsigned long) (submatrix.h:94)
==13526== by 0x4355FA:
LinBox::MoorePenrose<LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > >
>::MoorePenrose(LinBox::SparseMatrix<LinBox::Modular<unsigned>,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vector<unsigned, std::allocator<unsigned> > > > const*, unsigned
long) (moore-penrose.h:79)
==13526== by 0x413D11: bool
testRandomApply1<LinBox::Modular<unsigned>, std::vector<unsigned,
std::allocator<unsigned> >, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >(LinBox::Modular<unsigned>&, unsigned
long, unsigned long, unsigned long, unsigned, double,
LinBox::VectorStream<std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >&,
LinBox::VectorStream<std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<unsigned,
std::allocator<unsigned> > > >&,
LinBox::VectorStream<std::vector<unsigned, std::allocator<unsigned> >
>&) (test-moore-penrose.C:252)
==13526== by 0x41472B: main (test-moore-penrose.C:364)
****************************************************************
test-scalar-matrix
==14085== Conditional jump or move depends on uninitialised value(s)
==14085== at 0x5BB82C8: __gmpz_set (in /scratch/mabshoff/gmp-4.2.2-
bin/lib/libgmp.so.3.4.2)
==14085== by 0x417AF0: Integer::logcpy(Integer const&) (gmp+
+_int.inl:26)
==14085== by 0x417B1C: Integer::operator=(Integer const&) (gmp+
+_int.inl:31)
==14085== by 0x417B4C:
LinBox::ModularBase<unsigned>::cardinality(Integer&) const (modular.h:
143)
==14085== by 0x41AD41:
LinBox::ModularBase<unsigned>::RandIter::RandIter(LinBox::Modular<unsigned>
const&, Integer const&, Integer const&) (modular.h:262)
==14085== by 0x40BBF4: bool
testBlackbox<LinBox::ScalarMatrix<LinBox::Modular<unsigned> >
>(LinBox::ScalarMatrix<LinBox::Modular<unsigned> >&) (test-blackbox.h:
252)
==14085== by 0x40D831: main (test-scalar-matrix.C:51)
==14085== Conditional jump or move depends on uninitialised value(s)
==14085== at 0x410D09: __gmpz_get_ui (gmp.h:1675)
==14085== by 0x40415C: Integer::operator unsigned() const (gmp+
+_int_misc.C:236)
==14085== by 0x41ADC1:
LinBox::ModularBase<unsigned>::RandIter::RandIter(LinBox::Modular<unsigned>
const&, Integer const&, Integer const&) (modular.h:267)
==14085== by 0x40BBF4: bool
testBlackbox<LinBox::ScalarMatrix<LinBox::Modular<unsigned> >
>(LinBox::ScalarMatrix<LinBox::Modular<unsigned> >&) (test-blackbox.h:
252)
==14085== by 0x40D831: main (test-scalar-matrix.C:51)
==14085== Conditional jump or move depends on uninitialised value(s)
==14085== at 0x405078:
LinBox::MersenneTwister::randomIntRange(unsigned, unsigned) (mersenne-
twister.C:131)
==14085== by 0x411E52:
LinBox::MersenneTwister::randomIntRange(unsigned, unsigned) const
(mersenne-twister.h:49)
==14085== by 0x411E7A:
LinBox::ModularBase<unsigned>::RandIter::random(unsigned&) const
(modular.h:279)
==14085== by 0x40BC97: bool
testBlackbox<LinBox::ScalarMatrix<LinBox::Modular<unsigned> >
>(LinBox::ScalarMatrix<LinBox::Modular<unsigned> >&) (test-blackbox.h:
255)
==14085== by 0x40D831: main (test-scalar-matrix.C:51)
==14085==
==14085== Use of uninitialised value of size 8
==14085== at 0x5E54D3F: (within /usr/lib/libstdc++.so.6.0.8)
==14085== by 0x5E64936: std::ostreambuf_iterator<char,
std::char_traits<char> > std::num_put<char,
std::ostreambuf_iterator<char, std::char_traits<char> >
>::_M_insert_int<long>(std::ostreambuf_iterator<char,
std::char_traits<char> >, std::ios_base&, char, long) const (in /usr/
lib/libstdc++.so.6.0.8)
==14085== by 0x5E64BF6: std::num_put<char,
std::ostreambuf_iterator<char, std::char_traits<char> >
>::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >,
std::ios_base&, char, long) const (in /usr/lib/libstdc++.so.6.0.8)
==14085== by 0x5E6D00E: std::ostream::operator<<(int) (in /usr/lib/
libstdc++.so.6.0.8)
==14085== by 0x418BC2:
LinBox::ModularBase<unsigned>::write(std::ostream&, unsigned const&)
const (modular.h:222)
==14085== by 0x40B32C: bool
testLinearity<LinBox::Modular<unsigned>,
LinBox::ScalarMatrix<LinBox::Modular<unsigned> >,
std::vector<unsigned, std::allocator<unsigned> >
>(LinBox::Modular<unsigned>&,
LinBox::ScalarMatrix<LinBox::Modular<unsigned> >&,
LinBox::VectorStream<std::vector<unsigned, std::allocator<unsigned> >
>&, LinBox::VectorStream<std::vector<unsigned,
std::allocator<unsigned> > >&) (test-blackbox.h:170)
==14085== by 0x40BCF3: bool
testBlackbox<LinBox::ScalarMatrix<LinBox::Modular<unsigned> >
>(LinBox::ScalarMatrix<LinBox::Modular<unsigned> >&) (test-blackbox.h:
258)
==14085== by 0x40D831: main (test-scalar-matrix.C:51)
****************************************************************
test-zero-one
==14152== Conditional jump or move depends on uninitialised value(s)
==14152== at 0x416DC3: LinBox::ZeroOne<LinBox::Modular<unsigned>
>::_part(unsigned long, unsigned long, int&) const (zero
-one.inl:240)
==14152== by 0x417103: LinBox::ZeroOne<LinBox::Modular<unsigned>
>::_qsort(unsigned long, unsigned long, int&) const (zer
o-one.inl:215)
==14152== by 0x417172: LinBox::ZeroOne<LinBox::Modular<unsigned>
>::rowSort() const (zero-one.inl:193)
==14152== 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)
==14152== 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)
==14152== 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)
==14152== by 0x40BD29: bool
testBlackbox<LinBox::ZeroOne<LinBox::Modular<unsigned> >
>(LinBox::ZeroOne<LinBox::Modular<un
signed> >&) (test-blackbox.h:258)
==14152== by 0x40D956: main (test-zero-one.C:53)
==14152== Use of uninitialised value of size 8
==14152== at 0x417544: std::vector<unsigned,
std::allocator<unsigned> >& LinBox::ZeroOne<LinBox::Modular<unsigned>
>::applySpecialization<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&,
LinBox::ZeroOne<LinBox::Modular<unsigned> >::Mod32Field const&) const
(zero-one.inl:356)
==14152== by 0x417641: std::vector<unsigned,
std::allocator<unsigned> >& LinBox::ZeroOne<LinBox::Modular<unsigned>
>::apply<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)
==14152== by 0x40B3B1: bool
testLinearity<LinBox::Modular<unsigned>,
LinBox::ZeroOne<LinBox::Modular<unsigned> >, std::vector<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::allocator<unsigned> > >&) (test-blackbox.h:173)
==14152== by 0x40BD29: bool
testBlackbox<LinBox::ZeroOne<LinBox::Modular<unsigned> >
>(LinBox::ZeroOne<LinBox::Modular<unsigned> >&) (test-blackbox.h:258)
==14152== by 0x40D956: main (test-zero-one.C:53)
****************************************************************
test-ispossemidef leaks some serious memory:
==12419== LEAK SUMMARY:
==12419== definitely lost: 736 bytes in 4 blocks.
==12419== indirectly lost: 614,624 bytes in 25,632 blocks.
==12419== possibly lost: 0 bytes in 0 blocks.
==12419== still reachable: 64 bytes in 1 blocks.
==12419== suppressed: 0 bytes in 0 blocks.
For example:
==12419== 409,600 bytes in 4 blocks are indirectly lost in loss record
12 of 12
==12419== at 0x4A1C649: operator new(unsigned long)
(vg_replace_malloc.c:230)
==12419== by 0x41E845:
__gnu_cxx::new_allocator<Integer>::allocate(unsigned long, void
const*) (new_allocator.h:88)
==12419== by 0x41E86C: std::_Vector_base<Integer,
std::allocator<Integer> >::_M_allocate(unsigned long) (stl_vector.h:
127
)
==12419== by 0x41E89E: std::_Vector_base<Integer,
std::allocator<Integer> >::_Vector_base(unsigned long,
std::allocator<I
nteger> const&) (stl_vector.h:113)
==12419== by 0x421135: std::vector<Integer, std::allocator<Integer>
>::vector(unsigned long, Integer const&, std::allocat
or<Integer> const&) (stl_vector.h:216)
==12419== by 0x421206:
LinBox::DenseMatrixBase<Integer>::DenseMatrixBase(unsigned long,
unsigned long) (dense.h:101)
==12419== by 0x425046:
LinBox::DenseMatrix<LinBox::PID_integer>::DenseMatrix(LinBox::PID_integer
const&, unsigned long, u
nsigned long) (dense.h:98)
==12419== by 0x430B0C: 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)
==12419== by 0x44C096: bool
LinBox::isPositiveSemiDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vecto
r<unsigned long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > > >(LinBox::SparseMatrix<
LinBox::PID_integer, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<Integer, std::allocat
or<Integer> > > > const&, LinBox::RingCategories::IntegerTag const&,
LinBox::BlasEliminationTraits const&) (is-positive-semi
definite.h:116)
==12419== by 0x44C0DB: bool
LinBox::isPositiveSemiDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vecto
r<unsigned long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > > >(LinBox::SparseMatrix<
LinBox::PID_integer, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<Integer, std::allocat
or<Integer> > > > const&, LinBox::RingCategories::IntegerTag const&,
LinBox::EliminationSpecifier const&) (is-positive-semid
efinite.h:82)
==12419== by 0x44C1AE: bool
LinBox::isPositiveSemiDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vecto
r<unsigned long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > > >(LinBox::SparseMatrix<
LinBox::PID_integer, std::pair<std::vector<unsigned long,
std::allocator<unsigned long> >, std::vector<Integer, std::allocat
or<Integer> > > > const&, LinBox::RingCategories::IntegerTag const&,
LinBox::HybridSpecifier const&) (is-positive-semidefini
te.h:68)
==12419== by 0x44C1F1: bool
LinBox::isPositiveSemiDefinite<LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vecto
r<unsigned long, std::allocator<unsigned long> >, std::vector<Integer,
std::allocator<Integer> > > >, LinBox::HybridSpecifie
r>(LinBox::SparseMatrix<LinBox::PID_integer,
std::pair<std::vector<unsigned long, std::allocator<unsigned long> >,
std::vect
or<Integer, std::allocator<Integer> > > > const&,
LinBox::HybridSpecifier const&) (is-positive-semidefinite.h:35)