From: Paul Eggert Date: Tue, 16 May 2017 21:30:37 +0000 (-0700) Subject: Do not discard AddressSanitizer stderr X-Git-Tag: emacs-26.0.90~521^2~386 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=69d0a8500cabc4c034e2d6d873af54a8e8362e3b;p=emacs.git Do not discard AddressSanitizer stderr * src/emacs.c (close_output_streams) [ADDRESS_SANITIZER]: Do not close stderr. --- diff --git a/src/emacs.c b/src/emacs.c index 9339d60866c..3aa914f22fa 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -657,8 +657,11 @@ close_output_streams (void) _exit (EXIT_FAILURE); } - if (close_stream (stderr) != 0) - _exit (EXIT_FAILURE); + /* Do not close stderr if addresses are being sanitized, as the + sanitizer might report to stderr after this function is + invoked. */ + if (!ADDRESS_SANITIZER && close_stream (stderr) != 0) + _exit (EXIT_FAILURE); } /* ARGSUSED */