SHA256
1
0
forked from pool/glibc
glibc/abort-no-flush.patch
Andreas Schwab 7864f220da Accepting request 512670 from home:Andreas_Schwab:Factory
- Update to glibc-2.25.90.20170720.gc771b59a24c0
  * A per-thread cache has been added to malloc
  * Unicode 10.0.0 Support
  * Improvements to the DNS stub resolver
  * New function reallocarray, which resizes an allocated block (like
    realloc) to the product of two sizes, with a guaranteed clean failure
    upon integer overflow in the multiplication
  * New wrappers for the Linux-specific system calls preadv2 and pwritev2
  * posix_spawnattr_setflags now supports the flag POSIX_SPAWN_SETSID, to
    create a new session ID for the spawned process
  * errno.h is now safe to use from C-preprocessed assembly language on all
    supported operating systems
  * On ia64, powerpc64le, x86-32, and x86-64, the math library now implements
    128-bit floating point as defined by ISO/IEC/IEEE 60559:2011 (IEEE
    754-2008) and ISO/IEC TS 18661-3:2015
  * The synchronization that pthread_spin_unlock performs has been changed to
    now be equivalent to a C11 atomic store with release memory order to the
    spin lock's memory location
  * The DNS stub resolver no longer performs EDNS fallback
  * res_mkquery and res_nmkquery no longer support the IQUERY opcode
  * The _res_opcodes variable has been removed from libresolv
  * <string.h> no longer includes inline versions of any string functions,
    as this kind of optimization is better done by the compiler
  * The nonstandard header <xlocale.h> has been removed
  * The obsolete header <sys/ultrasound.h> has been removed
  * The obsolete signal constant SIGUNUSED is no longer defined by <signal.h>
  * The obsolete function cfree has been removed
  * The stack_t type no longer has the name struct sigaltstack
  * The ucontext_t type no longer has the name struct ucontext
  * On S/390 GNU/Linux, the constants defined by <sys/ptrace.h> have been

OBS-URL: https://build.opensuse.org/request/show/512670
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=467
2017-07-26 15:08:57 +00:00

81 lines
2.0 KiB
Diff

Don't close or flush stdio streams on abort
[BZ #15436]
* stdlib/abort.c (abort): Don't call fflush and __fcloseall.
Index: glibc-2.19/stdlib/abort.c
===================================================================
--- glibc-2.19.orig/stdlib/abort.c
+++ glibc-2.19/stdlib/abort.c
@@ -30,9 +30,6 @@
# define ABORT_INSTRUCTION
#endif
-#include <libio/libioP.h>
-#define fflush(s) _IO_flush_all_lockp (0)
-
/* Exported variable to locate abort message in core files etc. */
struct abort_msg_s *__abort_msg __attribute__ ((nocommon));
libc_hidden_def (__abort_msg)
@@ -66,16 +63,8 @@ abort (void)
__sigprocmask (SIG_UNBLOCK, &sigs, 0);
}
- /* Flush all streams. We cannot close them now because the user
- might have registered a handler for SIGABRT. */
- if (stage == 1)
- {
- ++stage;
- fflush (NULL);
- }
-
/* Send signal which possibly calls a user handler. */
- if (stage == 2)
+ if (stage == 1)
{
/* This stage is special: we must allow repeated calls of
`abort' when a user defined handler for SIGABRT is installed.
@@ -93,7 +82,7 @@ abort (void)
}
/* There was a handler installed. Now remove it. */
- if (stage == 3)
+ if (stage == 2)
{
++stage;
memset (&act, '\0', sizeof (struct sigaction));
@@ -103,30 +92,22 @@ abort (void)
__sigaction (SIGABRT, &act, NULL);
}
- /* Now close the streams which also flushes the output the user
- defined handler might has produced. */
- if (stage == 4)
- {
- ++stage;
- __fcloseall ();
- }
-
/* Try again. */
- if (stage == 5)
+ if (stage == 3)
{
++stage;
raise (SIGABRT);
}
/* Now try to abort using the system specific command. */
- if (stage == 6)
+ if (stage == 4)
{
++stage;
ABORT_INSTRUCTION;
}
/* If we can't signal ourselves and the abort instruction failed, exit. */
- if (stage == 7)
+ if (stage == 5)
{
++stage;
_exit (127);