Re: ntdll: implement FLG_HEAP_ENABLE_TAIL_CHECK

2009-11-18 Thread Dan Kegel
OK, here's something that seems to mostly work, and even gives reasonable valgrind errors. To use it, apply the patch and then do export WINE_HEAP_REDZONE=16 or so. (Bigger values catch more problems but add more overhead.) Only eleven tests generate warnings with that set: runtest -q -P wine

Re: ntdll: implement FLG_HEAP_ENABLE_TAIL_CHECK

2009-11-18 Thread Dan Kegel
On Wed, Nov 18, 2009 at 2:28 PM, Dan Kegel wrote: > Here's a second try, this time only for large arenas, but > with valgrind integration working.  (It also has a workaround for > a strange valgrind problem that leaves an empty variable in > the environment that confuses wine.) Found buglets alre

Re: ntdll: implement FLG_HEAP_ENABLE_TAIL_CHECK

2009-11-18 Thread Dan Kegel
On Wed, Nov 18, 2009 at 12:47 PM, Eric Pouech wrote: > interesting stuff > however, you don't handle correctly HeapReAlloc(..., ZERO_MEMORY,...) calls > when the already allocated block grows in place Thanks for catching that. I decided to start over and push the tail fill down into the heap rout

Re: ntdll: implement FLG_HEAP_ENABLE_TAIL_CHECK

2009-11-18 Thread Eric Pouech
Dan Kegel a écrit : (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. T

ntdll: implement FLG_HEAP_ENABLE_TAIL_CHECK

2009-11-17 Thread Dan Kegel
(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 overru