fix bug in -delay_frees_stack -replace_malloc: set user_data to NULL after
freeing it

git-svn-id: https://drmemory.googlecode.com/svn/trunk@928 5b54908e-ead4-fc18-b48a-0285e6dbc711
fixes issue 944
+ check for overflow on malloc request size

git-svn-id: https://drmemory.googlecode.com/svn/trunk@929 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#893 Rtl heap replacement fixes
+ fix realloc of pre-us
+ tweak comments

git-svn-id: https://drmemory.googlecode.com/svn/trunk@930 5b54908e-ead4-fc18-b48a-0285e6dbc711
fix source file COMPILE_FLAGS property for DRi#850: APPEND no longer works
and APPEND_STRING is too new

git-svn-id: https://drmemory.googlecode.com/svn/trunk@931 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#900, part 1
fixes issue 935

use the new continuation-style drwrap_replace_native
+ call drwrap_replace_native_fini() prior to returning
+ mark replacement frame pointer as defined for callstack
  walk to include (xref i#639)
+ app retaddr is now unchanged on the stack (i#935)
+ all native-replaced routines must invoke drwrap_replace_native_fini()

updates DR to r1493 for:
+ DRi#779: dr_recurlock_mark_as_app()
+ DRi#849: new continuation-style drwrap_replace_native()



git-svn-id: https://drmemory.googlecode.com/svn/trunk@932 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#900, part 2
fixes issue 900

+ use dr_mark_safe_to_suspend() to safely acquire an application lock
  while running in client code
+ use dr_recurlock_mark_as_app() to avoid lock asserts in DR due
  to the use of the arena lock as an application lock yet using
  a DR lock data structure

git-svn-id: https://drmemory.googlecode.com/svn/trunk@933 5b54908e-ead4-fc18-b48a-0285e6dbc711
fixes issue 639
+ for -replace_malloc, continuation-style solution from i#900
  allows naturally using the malloc call as the top frame
+ add /debug to get proper replace_* syms for drmemorylib
+ disable -callstack_use_top_fp_selectively for -replace_malloc
  for invalid arg or leak error types: we trust our
  replace_* routines to be compiled w/ frame pointers
+ for -replace_malloc, don't sub 1 (for both Windows and postprocess.pl)
  for malloc + invalid arg top frames
+ add *drmemory* to -callstack_modname_hide for better frames to
  hide the "drmemorylib.dll!" or "libdrmemory.so.1.4.836!"

git-svn-id: https://drmemory.googlecode.com/svn/trunk@934 5b54908e-ead4-fc18-b48a-0285e6dbc711
add RtlUserThreadStart and _threadstartex for stack truncate

git-svn-id: https://drmemory.googlecode.com/svn/trunk@936 5b54908e-ead4-fc18-b48a-0285e6dbc711
fixed issue 763
- put foo(use-41) in _DEBUG only

git-svn-id: https://drmemory.googlecode.com/svn/trunk@937 5b54908e-ead4-fc18-b48a-0285e6dbc711
fixed issue 954:
- make struct packed_frame_t and full_frame_t packed

git-svn-id: https://drmemory.googlecode.com/svn/trunk@938 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#893 Rtl Heap replacement continued:
+ disable lock check on windows where app can grab lock separately
+ replace ignore remove asserts

git-svn-id: https://drmemory.googlecode.com/svn/trunk@939 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#950: handle app corrupting -replace_malloc headers

Two fixes:
1) Move header to the middle of the redzone.  Unfortunately this
   does nothing for the default options since the header occupies
   the entire redzone.

2) Move the magic field to the end of the header.
   Better to report an extra invalid heap arg and extra leak
   than to crash.

Also adjusted wincrt test for -replace_malloc though can't run it yet b/c
I'm missing the types and so alloc mismatches show up.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@940 5b54908e-ead4-fc18-b48a-0285e6dbc711