This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/20198] quick_exit incorrectly destroys C++11 thread objects.


https://sourceware.org/bugzilla/show_bug.cgi?id=20198

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  47dd3543d36465496970406da03db5aecdc377ee (commit)
      from  3f61232ab337b8162ed1a37558b30ce714dba894 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=47dd3543d36465496970406da03db5aecdc377ee

commit 47dd3543d36465496970406da03db5aecdc377ee
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Mon Jun 6 14:20:58 2016 -0400

    Bug 20198: quick_exit should not call destructors.

    In C++11 18.5.12 says "Objects shall not be destroyed as a
    result of calling quick_exit." In C11 quick_exit is silent
    about thread object destruction. Therefore to make glibc
    C++ compliant we do not call any thread local destructors.
    A new regression test verifies the fix.

    I will note that C++11 18.5.3 makes it clear that C++
    defines additional requirements for _Exit() to prevent it
    from executing destructors.

    Given that the point of _Exit() is to terminate the process
    immediately it makes sense the C and C++ should line up
    and avoid calling destructors.

    No failures. New regtest passes.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   54 ++++++++++++++++++++
 stdlib/Makefile                                    |   12 ++++-
 stdlib/Versions                                    |    3 +
 stdlib/exit.c                                      |    7 ++-
 stdlib/exit.h                                      |    5 +-
 stdlib/quick_exit.c                                |   23 ++++++++-
 elf/tst-pie2.c => stdlib/tst-quick_exit.cc         |   31 ++++++------
 .../tst-thread-quick_exit.cc                       |   43 ++++++++-------
 sysdeps/arm/nacl/libc.abilist                      |    1 +
 sysdeps/unix/sysv/linux/aarch64/libc.abilist       |    1 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist         |    1 +
 sysdeps/unix/sysv/linux/arm/libc.abilist           |    1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist          |    1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist          |    1 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist          |    1 +
 sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist |    1 +
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist   |    1 +
 sysdeps/unix/sysv/linux/microblaze/libc.abilist    |    1 +
 .../unix/sysv/linux/mips/mips32/fpu/libc.abilist   |    1 +
 .../unix/sysv/linux/mips/mips32/nofpu/libc.abilist |    1 +
 .../unix/sysv/linux/mips/mips64/n32/libc.abilist   |    1 +
 .../unix/sysv/linux/mips/mips64/n64/libc.abilist   |    1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist         |    1 +
 .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist  |    1 +
 .../linux/powerpc/powerpc32/nofpu/libc.abilist     |    1 +
 .../sysv/linux/powerpc/powerpc64/libc-le.abilist   |    1 +
 .../unix/sysv/linux/powerpc/powerpc64/libc.abilist |    1 +
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist  |    1 +
 sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist  |    1 +
 sysdeps/unix/sysv/linux/sh/libc.abilist            |    1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist |    1 +
 sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist |    1 +
 .../sysv/linux/tile/tilegx/tilegx32/libc.abilist   |    1 +
 .../sysv/linux/tile/tilegx/tilegx64/libc.abilist   |    1 +
 sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist  |    1 +
 sysdeps/unix/sysv/linux/x86_64/64/libc.abilist     |    1 +
 sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist    |    1 +
 37 files changed, 163 insertions(+), 44 deletions(-)
 copy elf/tst-pie2.c => stdlib/tst-quick_exit.cc (67%)
 copy elf/tst-dl-iter-static.c => stdlib/tst-thread-quick_exit.cc (58%)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]