[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange memory corruption when using vector (works with deque)
From: |
Reinhold Kainhofer |
Subject: |
Re: Strange memory corruption when using vector (works with deque) |
Date: |
Sat, 21 Nov 2009 17:31:50 +0100 |
User-agent: |
KMail/1.12.2 (Linux/2.6.31-15-generic; KDE/4.3.2; i686; ; ) |
Am Samstag, 21. November 2009 02:02:11 schrieben Sie:
> On Fri, 2009-11-20 at 18:35 +0100, Reinhold Kainhofer wrote:
> > While fixing bug 676, I ran into a very strange memory corruption
> > situation: Like in the tie-engraver.cc, I used vectors in
> > tie-performer.cc to store the moment together with the
> > Audio_element_info.
> >
> > Now, this always led to memory corruption as soon as I called push_back.
> > Before the push_back call, the size() of the vector was 0, after the
> > push_back, the size() would be reported as 3303820998 (instead of 1)?!?!?
> >
> > Using a deque instead of a vector works just fine.
>
> Have you tried valgrind?
Yes, of course (that cause my Springs.cc commit about uninitialized
variables), but that hasn't been helpful at all...
> The memory corruption could be in a completely
> different part of the code. I have a suppression file lying around that
> eliminates most of the spurious guile warnings for valgrind if you want
> it.
yes, that would be really great. The abundance of guile warnings doesn't make
debugging easy...
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org