msvcrt heap: fix _aligned_offset_realloc (move correct block of memory); add a comment to explain why. [1/2]

Lionel Debroux lionel_debroux at
Mon Nov 26 03:08:59 CST 2007

A recent memory leak fix in the msvcrt heap tests, made by Dan Kegel, uncovered a bug in
_aligned_offset_realloc: the data contained in the previously allocated block is copied at a wrong
offset in the newly allocated block, often overwriting the arena magic and other heap structures.
As a result, the test crashes.

Here's a patch that fixes _aligned_offset_realloc, and adds an explanation of the data layout in
See also:

Yahoo! Mail innove : interface hyper pratique, messenger intégré, couleurs -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-msvcrt-fix-_aligned_offset_realloc-move-correct-bl.patch
Type: text/x-diff
Size: 0 bytes
Desc: 2785475203-0001-msvcrt-fix-_aligned_offset_realloc-move-correct-bl.patch
Url : 

More information about the wine-patches mailing list