Steven Schveighoffer <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Steven Schveighoffer <> 2010-03-11 
05:10:16 PST ---
I found the problem.  It has nothing to do with the cache, but it has to do
with a bug with how I store the length in the block.

Because I must store the length of a block that is page size or greater at the
front of the block (smaller blocks I store the length at the end), the start of
an array is offset by 2*size_t.sizeof bytes.

The problem comes when initializing a newly allocated array.  I forgot to add
the offset for larger arrays when calling memset, so the last 2*size_t.sizeof
bytes are not initialized.  In addition, if you allocated a large array of
structs which had a non-uniform initializer, they could all be skewed!

I think this fix is worth a new release of dmd.  I checked in the changes, but
druntime doesn't build at the moment, I think someone is adding stack tracing. 
Try this patch on your local copy of druntime and see if it fixes the problem
for you:

cc'ing walter to notify him.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to