Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Santos <daniel.santos@pobox.com>2017-04-19 19:06:02 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-04-19 21:17:04 +0300
commitb43e28aef0764be86bed5f48c734361957f2cbb1 (patch)
tree0d4d550832387f6b36c8a9de8ef7af0e19a8568b /winsup/utils
parent161b4ff037fa62a3d9d338333d2ad198b98223e5 (diff)
strace: Fix "over-optimization" flaw in strace.
Recent versions of gcc are optimizing away the TLS buffer allocated in main, so we need to tell gcc that it's really used. RtlSecureZeroMemory accomplishes this while also inlining the memset. Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/strace.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index beab67b90..ae62cdc5f 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -1191,7 +1191,7 @@ main (int argc, char **argv)
registry setting to 0x100000 (TOP_DOWN). */
char buf[CYGTLS_PADSIZE];
- memset (buf, 0, sizeof (buf));
+ RtlSecureZeroMemory (buf, sizeof (buf));
exit (main2 (argc, argv));
}