[PATCH v2] strace: Fix "over-optimization" flaw in strace.
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Apr 19 18:48:00 GMT 2017
On Apr 19 11:06, Daniel Santos wrote:
> 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>
> ---
> winsup/utils/strace.cc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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));
> }
>
> --
> 2.11.0
Pushed.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20170419/27824710/attachment.sig>
More information about the Cygwin-patches
mailing list