[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: |
Joe Neeman |
Subject: |
Re: Strange memory corruption when using vector (works with deque) |
Date: |
Fri, 20 Nov 2009 17:02:11 -0800 |
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? 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. I don't know how platform-independent it is, though.
Joe