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

Lionel Debroux lionel_debroux at yahoo.fr
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
memory.
See also: http://bugs.winehq.org/show_bug.cgi?id=10521


      ____________________________________________________________________________________________
Yahoo! Mail innove : interface hyper pratique, messenger intégré, couleurs - http://mail.yahoo.fr
-------------- 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 : http://www.winehq.org/pipermail/wine-patches/attachments/20071126/57925f89/attachment.patch 


More information about the wine-patches mailing list