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/21517] struct sigaltstack namespace


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

--- Comment #1 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  7553131847151d04d58a02300673f13d73861cbb (commit)
      from  8951dd0b148c260afde95ac7179e9067276ed6d7 (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=7553131847151d04d58a02300673f13d73861cbb

commit 7553131847151d04d58a02300673f13d73861cbb
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jun 5 10:17:46 2017 +0000

    Fix struct sigaltstack namespace (bug 21517).

    glibc defines the stack_t type with the tag struct sigaltstack.  This
    is not permitted by POSIX; sigaltstack is only reserved with file
    scope in the namespace of ordinary identifiers, not the tag namespace,
    and in the case where stack_t is obtained from ucontext.h rather than
    signal.h, it's not reserved with file scope at all.

    This patch removes the tag accordingly and updates uses in glibc of
    struct sigaltstack.  This is similar to the removal of the "struct
    siginfo" tag a few years ago: C++ name mangling changes are an
    unavoidable consequence.  A NEWS item is added to note the changed
    mangling.  There is inevitably some risk of breaking builds of
    anything that relies on the struct sigaltstack name (though the first
    few hits I looked at from codesearch.debian.net generally seemed to
    involve code that could use the stack_t name conditionally, so
    depending on how they determine the conditionals they may work with
    glibc not defining the struct tag anyway).

    Tested for x86_64 and x86, and with build-many-glibcs.py.

        [BZ #21517]
        * bits/types/stack_t.h (stack_t): Remove struct tag.
        * sysdeps/unix/sysv/linux/bits/types/stack_t.h (stack_t):
        Likewise.
        * sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h (stack_t):
        Likewise.
        * debug/segfault.c (install_handler): Use stack_t instead of
        struct sigaltstack.
        * hurd/hurd/signal.h (struct hurd_sigstate): Likewise.
        * hurd/trampoline.c (_hurd_setup_sighandler): Likewise.
        * include/signal.h (__sigaltstack): Likwise.
        * signal/sigaltstack.c (__sigaltstack): Likewise.
        * signal/signal.h (sigaltstack): Likewise.
        * sysdeps/mach/hurd/i386/signal-defines.sym
        (SIGALTSTACK__SS_SP__OFFSET): Likewise.
        (SIGALTSTACK__SS_SIZE__OFFSET): Likewise.
        (SIGALTSTACK__SS_FLAGS__OFFSET): Likewise.
        * sysdeps/mach/hurd/sigaltstack.c (__sigaltstack): Likewise.
        * sysdeps/mach/hurd/sigstack.c (sigstack): Likewise.
        * sysdeps/unix/sysv/linux/alpha/sys/procfs.h (struct
        elf_prstatus): Likewise.
        * sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c (CHECK_SP):
        Likewise.
        * sysdeps/unix/sysv/linux/ia64/sys/procfs.h (struct elf_prstatus):
        Likewise.
        * sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c (CHECK_SP):
        Likewise.
        * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (struct
        elf_prstatus): Likewise.
        * sysdeps/unix/sysv/linux/sh/sys/procfs.h (struct elf_prstatus):
        Likewise.
        * sysdeps/unix/sysv/linux/sys/procfs.h (struct elf_prstatus):
        Likewise.

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

Summary of changes:
 ChangeLog                                         |   36 +++++++++++++++++++++
 NEWS                                              |    3 ++
 bits/types/stack_t.h                              |    2 +-
 debug/segfault.c                                  |    2 +-
 hurd/hurd/signal.h                                |    2 +-
 hurd/trampoline.c                                 |    2 +-
 include/signal.h                                  |    4 +-
 signal/sigaltstack.c                              |    2 +-
 signal/signal.h                                   |    4 +-
 sysdeps/mach/hurd/i386/signal-defines.sym         |    6 ++--
 sysdeps/mach/hurd/sigaltstack.c                   |    6 ++--
 sysdeps/mach/hurd/sigstack.c                      |    2 +-
 sysdeps/unix/sysv/linux/alpha/sys/procfs.h        |    2 +-
 sysdeps/unix/sysv/linux/bits/types/stack_t.h      |    2 +-
 sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c    |    2 +-
 sysdeps/unix/sysv/linux/ia64/sys/procfs.h         |    2 +-
 sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c    |    2 +-
 sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h |    2 +-
 sysdeps/unix/sysv/linux/powerpc/sys/procfs.h      |    2 +-
 sysdeps/unix/sysv/linux/sh/sys/procfs.h           |    2 +-
 sysdeps/unix/sysv/linux/sys/procfs.h              |    2 +-
 21 files changed, 64 insertions(+), 25 deletions(-)

-- 
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]