]> git.eshelyaron.com Git - emacs.git/commitdiff
Do not discard AddressSanitizer stderr
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 16 May 2017 21:30:37 +0000 (14:30 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 16 May 2017 21:31:49 +0000 (14:31 -0700)
* src/emacs.c (close_output_streams) [ADDRESS_SANITIZER]:
Do not close stderr.

src/emacs.c

index 9339d60866cbfc7aa00fa1ba90bc9e46f125318e..3aa914f22fa104f2e16f2efceb4d71e9de664906 100644 (file)
@@ -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 */