http://bugs.winehq.org/show_bug.cgi?id=10521
--- Comment #6 from Lionel Debroux lionel_debroux@yahoo.fr 2007-11-24 09:26:52 --- Created an attachment (id=9310) --> (http://bugs.winehq.org/attachment.cgi?id=9310) Two patches for _alligned_realloc_offset & tests + one helper patch.
I think I've tracked down and fixed the problem with _aligned_realloc_offset (and therefore _aligned_realloc, which calls _aligned_realloc_offset with offset = 0).
Patch #1 contains a fix for _aligned_realloc_offset, along with an explanation of why things should go that way (based on my own understanding of the heap management). Maybe it isn't the best place to put such an explanation ? Patch #2 adds more tests for _aligned_realloc_offset, especially tests where offset > alignment (which is apriori legal, but was mostly untested). Patch #3 is an extended version of the arena magic printing patch I previously attached to this bug.
With patches #1 and #2 applied, the msvcrt heap test is valgrind-clean.
Please review and test :)