i#1100: Don't report syscall reads in the post callback

I hit NtUserTrackMouseEvent on chrome, and found the two others by
manual inspection.

Fixes issue 1100.

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

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1146 5b54908e-ead4-fc18-b48a-0285e6dbc711
fixed issue 1103
- iterate syscall args only if syscall succeed
- update handle.res handle.out

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

Set arg->pre to true for drsys_iterate_args() even when in post-syscall in order
to hit all the report_sysarg() cases in os_handle_pre_syscall().

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

Relax translation test assert to handle -no_fastpath scenarios.

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

Set zeroed_xbp on all paths when clearing ebp for callstack walks.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1150 5b54908e-ead4-fc18-b48a-0285e6dbc711
add condition for macro defines in drsyscall.h to avoid redefine error.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1151 5b54908e-ead4-fc18-b48a-0285e6dbc711
add nonheap_alloc nonheap_free in drmf framework

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

+ For SYSARG_LENGTH_INOUT, size the safe_read to the width of the size
  specifier.
+ Use sizeof(socklen_t) rather than sizeof(int).
+ Add an strace test as a preliminary version of a later
  sample client and real tool.  Currently it adds minimal extra
  testing.  I tested the getsockname() issues on x64 app_suite
  with the strace client but it's non-trivial to turn that into a non-flaky
  test.

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

Update i#717 suppression to *dlopen* for recent FC17 callstack.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1154 5b54908e-ead4-fc18-b48a-0285e6dbc711
WI entry's length entry must contain R, unless WI is a dup entry:
+ Fix the NtUserUserConnectToServer entry
+ Add comments explaining SYSARG_LENGTH_INOUT usage

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1155 5b54908e-ead4-fc18-b48a-0285e6dbc711
add syscall info for those marked unknown in r1094

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1156 5b54908e-ead4-fc18-b48a-0285e6dbc711
fixed i#988-c#7,c#8
- add syscall_creates_handle
- skip syscalls that do not create new handles
- fix a wrong arg index on SetClipBoardData system call
- return on descriptor being NULL in handle_security_descriptor_access
  to avoid exception

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1157 5b54908e-ead4-fc18-b48a-0285e6dbc711
Fixed issue 1112
NtDuplicateObject handle can leak handles
- add support for NtDuplicateObject closing handle
- add test that uses DuplicateHandle to close/leak handles
- add handle leak report on syscall

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

+ Skips read-only file-mapped regions on both Windows and Linux.
  On Linux this is new behavior, and only affects image files (b/c
  there's no simple way to identify data files).
  On Windows the new behavior is skipping data files as opposed
  to just image files (targeting locale.nls).
+ Puts this behavior under off-by-default -scan_read_only_files
  rather than tracking whether pages have been read-only since
  they were mapped, as it does not seem worth the effort to do
  such tracking.

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

Adds heuristics to distinguish substrings that look like pointers:
+ Under an on-by-default option -strings_vs_pointers
+ Looks for a sequence of multiple strings to reduce false matches.
  All instances I've ever seen have been in sequences in any case.
+ Looks for both narrow and wide strings (wide only on Windows).
+ Added a stat for matches.
+ String check is after heap hit to reduce performance hit.
  I tested on cfrac and there's no noticeable perf hit.
+ Added a test leak_string.cpp.  It is able to set up appropriate
  heap nearly all the time on my win7 machine.  If it can't, it
  gracefully just passes w/o testing -strings_vs_pointers.

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

For general syscall handling, if the kernel-written size of a param is
larger than the passed-in size, use the passed-in size.

Changed check_sockaddr() to check the whole struct for addressability,
which was missing for many 32-bit cases.  For a write, the kernel seems to
fill in the size it specified w/o gaps, so not doing a per-field walk in
that case.

Added a getsockname test to drsyscall_app.c and a check in
drsyscall_client.c.  The strace test output also shows the fix but doesn't
programmatically verify it.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1161 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#1119 follow-up: share Linux sockaddr handling code with Windows which
also has struct sockaddr.

git-svn-id: https://drmemory.googlecode.com/svn/trunk@1162 5b54908e-ead4-fc18-b48a-0285e6dbc711
i#1056/i#1105c#3: use a name prefix on global vars to avoid conflicts with
including projects.

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