Thanks Tom for the help.  The --db-attach command is very cool :)

So with the invalid read, it is trying to read an address that is not
valid.  Would you happen to know what the line "16 bytes inside a
block 24 free'd" means?  I am using an std::list.  Is it possible the
problem is in the list? and not my actual code?

Thanks.

On Tue, Aug 11, 2009 at 9:13 AM, tom fogal<[email protected]> wrote:
> Jonathon <[email protected]> writes:
>> I was wondering if it is possible to get valgrind to make an "assert"
>> so my debugger can catch it when a memory error occurs?  I would like
>> to determine what is causing this memory error and it would be nice
>> if I could do this.
>
> No, but it can do better: suspend the process and automatically start
> your debugger.  Use the --db-attach=yes option.
>
>> Also, I am having a hard time deciphering this message, can anyone
>> please give me insight on what this error means? I've tried Google and
>> I had no luck :(
> [snip]
>>    1.      ==20770== Invalid read of size 8
>>    2.      ==20770==    at 0x662CBB: PacketPool::removePacket(Packet*)
>
> It means a variable, of width 8 (e.g. a double, long on amd64, etc.)
> is being read from yet is not valid.  `Read' probably means it's an
> rvalue.  `Invalid' implies the address is bad.  IIUC, memory is invalid
> by default, marked valid when you assign to it, marked invalid when you
> delete/free it.  There's a bit in the memcheck manual about 'shadow
> bits' and how they are used to track validity, IIRC.
>
> -tom
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to