On 05/08/10 22:11, John Reiser wrote:
>> ==1787== Thread 27:
>> ==1787== Invalid write of size 1
>> ==1787==    at 0x81E83D1: thin_quotes__collapse (order_book_updates.ads:19)
>> ==1787==  Address 0x6092bdc is on thread 27's stack
>>
>> I've seen reports like this before about a thread writing to a different
>> thread's stack, but here it's the thread writing to its own stack.
>
> Except for when the stack frame [that corresponds to a dynamic invocation
> of a subroutine] is being created, it is illegal to write to the saved return
> address or to the registers that are saved automatically according to the
> subroutine calling convention (the saved frame pointer, etc.).  These areas
> are "write once [at entry]" and "read once [at return]", except possibly for
> reading to generate tracebacks during error handling, etc.
>
> Also, on a thread stack there are some fixed areas that have similar
> restrictions: writable only at creation of the thread.

The most likely answer is probably that the program is writing to an 
address below the current stack pointer - ie to something that has 
already been popped off the stack.

One common cause would be returning a pointer to data which is on the 
stack to a calling routine.

Tom

-- 
Tom Hughes ([email protected])
http://compton.nu/

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to