fixes issue 1161

Pass an invalid allocation instead of an invalid heap handle on win8
where we can't recover from the latter.  Adds WINDOWS_8 and
WINDOWS_PRE_8 .res specifiers and updates all the .res files for the
malloc.c changes.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1224 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#1161 part 2: cs2bug

Similar issue for cs2bug, where on win8 any build has an unrecoverable
heap error in test_mismatch_dtr().  So we build with SKIP_MISMATCH_DTR
on win8, and have an extra build for replace_cs2bug that does
include test_mismatch_dtr().

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1225 5b54908e-ead4-fc18-b48a-0285e6dbc711
DRi#1103: NtFlushVirtualMemory takes in PULONG_PTR, not PULONG, for
the size.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1226 5b54908e-ead4-fc18-b48a-0285e6dbc711
properly preserve orig rpath

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1227 5b54908e-ead4-fc18-b48a-0285e6dbc711
set DR global flags before in-func config

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1228 5b54908e-ead4-fc18-b48a-0285e6dbc711
fix race in build after DR drconfig change from script to exe

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1229 5b54908e-ead4-fc18-b48a-0285e6dbc711
Update to DR r1977 to fix regression introduced in r1229 which assumed the
drdeploy scripts had already been replaced with binaries.

This also gives several DR bug fixes, like for .drpath on extensions, which
fix suite failures on some machines.



git-svn-id: https://drmemory.googlecode.com/svn/trunk@1230 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#1163: Fix Linux ioctl handling from drsyscall changes

Moves most of the ioctl size information into a secondary table, which
drsyscall already handles correctly.  Implements the XXX in the code.

Every case with an /* in-out */ comment has been marked R|W, which is
also necessary for drsyscall.

Fixes issue 1163.

Review URL: https://codereview.appspot.com/7535043

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