ntdll: implement FLG_HEAP_ENABLE_TAIL_CHECK

Dan Kegel dank at kegel.com
Tue Nov 17 16:03:23 CST 2009


(Without a change like this, Valgrind can't properly
detect buffer overruns, but even without Valgrind,
this change will improve Wine's ability to detect
buffer overruns.)

With this change, users can enable buffer overrun
detection in Wine by setting WINE_GLOBAL_FLAGS=0x10.
This is like the overrun detection in Windows enabled by
setting NtGlobalFlags to 0x10, but checks 16 bytes
rather than 8, and works for large allocations,
not just small ones.

With this enabled, a remarkable number of tests break.

I'm posting this to wine-devel for review while I
add valgrind annotations (which should make
it easier to tell whether the errors it detects are real or spurious)
and fix the spurious breakages.

Note that this change is a no-op under normal circumstances;
without setting WINE_GLOBAL_FLAGS, you shouldn't
see any breakage.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-add-support-for-FLG_HEAP_ENABLE_TAIL_CHECK.patch
Type: text/x-diff
Size: 15785 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20091117/c1d0795a/attachment-0001.patch>


More information about the wine-devel mailing list