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>
This commit is contained in:
Daniel Santos 2017-04-19 11:06:02 -05:00 committed by Corinna Vinschen
parent 161b4ff037
commit b43e28aef0
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}