Memory Corruption with AAs

Steven Schveighoffer schveiguy at yahoo.com
Fri Apr 2 10:45:27 PDT 2010


On Fri, 02 Apr 2010 13:15:36 -0400, dsimcha <dsimcha at yahoo.com> wrote:

> Has anyone else still been noticing difficult to reproduce memory  
> corruption
> issues in the presence of associative arrays with 2.042?  They seem to  
> happen
> very infrequently and non-deterministically.  I can only reproduce them  
> in the
> context of a large program.  However, they don't occur in 2.040 (the  
> release
> before the array stomping patch), and they are clearly a result of memory
> corruption, as contents of arrays change from what I expect them to be to
> completely random-looking values inside a loop that does a lot of memory
> management and uses AAs heavily but doesn't modify the values.

Are you using the latest trunk for druntime, or the stock 2.042 version?   
Because the AAs have been changed significantly since 2.042.

Not saying I'm blaming that, but let's make sure we are all on the same  
page.

What is the AA key/value types?

Do you use appending at all in your code?

The AA code only uses appending in one location, that is when setting the  
length of its array.

Can you narrow down what your code is doing when the corruption occurs? (I  
realize this might be impossible, but just thought I'd ask)

-Steve



More information about the Digitalmars-d mailing list