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/18508] S390: backtrace() returns infinitely deep stack frames with makecontext().


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

--- 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  890b7a4b33d482b5c768ab47d70758b80227e9bc (commit)
       via  fa4eeac73dd1c368bf06ef071fdf20d9f40c6c15 (commit)
       via  3fdc131c26fe7663360785d49d2c427b097742bb (commit)
      from  9aec6d2a2f2388b08db6af7c2369d8e694d82c9a (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=890b7a4b33d482b5c768ab47d70758b80227e9bc

commit 890b7a4b33d482b5c768ab47d70758b80227e9bc
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Tue Jul 7 16:11:14 2015 +0200

    S390: Fix "backtrace() returns infinitely deep stack frames with
makecontext()" [BZ #18508].

    On s390/s390x backtrace(buffer, size) returns the series of called
functions until
    "makecontext_ret" and additional entries (up to "size") with
"makecontext_ret".
    GDB-backtrace is also warning:
    "Backtrace stopped: previous frame identical to this frame (corrupt
stack?)"

    To reproduce this scenario you have to setup a new context with
makecontext()
    and activate it with setcontext(). See e.g. cf() function in testcase
stdlib/tst-makecontext.c.
    Or see bug in libgo "Bug 66303 - runtime.Caller() returns infinitely deep
stack frames
    on s390x " (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66303).

    This patch omits the cfi_startproc/cfi_endproc directives in ENTRY/END
macro of
    __makecontext_ret. Thus no frame information is generated in .eh_frame and
backtrace
    stops after __makecontext_ret. There is also no .eh_frame info for _start
or
    thread_start functions.

    ChangeLog:

        [BZ #18508]
        * stdlib/Makefile ($(objpfx)tst-makecontext3):
        Depend on $(libdl).
        * stdlib/tst-makecontext.c (cf): Test if _Unwind_Backtrace
        is not called infinitely times.
        (backtrace_helper): New function.
        (trace_arg): New struct.
        (st1): Enlarge stack size.
        * sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S:
        (__makecontext_ret): Omit cfi_startproc and cfi_endproc.
        * sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S:
        Likewise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fa4eeac73dd1c368bf06ef071fdf20d9f40c6c15

commit fa4eeac73dd1c368bf06ef071fdf20d9f40c6c15
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Tue Jul 7 16:11:14 2015 +0200

    S390: Regenerate ULPs.

    Regenerated ulps after recent changes.
    Tested on s390/s390x.
    All math-tests passes on s390 after this patch.

    ChangeLog:

        * sysdeps/s390/fpu/libm-test-ulps: Regenerated.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3fdc131c26fe7663360785d49d2c427b097742bb

commit 3fdc131c26fe7663360785d49d2c427b097742bb
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Tue Jul 7 16:11:14 2015 +0200

    S390: Fix sem.h conformance test failures.

    On s390 the following tests are failing due to unkown types time_t, pid_t:
    FAIL: conform/UNIX98/sys/sem.h/conform
    FAIL: conform/XOPEN2K/sys/sem.h/conform
    FAIL: conform/XOPEN2K8/sys/sem.h/conform
    FAIL: conform/XPG3/sys/sem.h/conform
    FAIL: conform/XPG4/sys/sem.h/conform

    This patch changes the s390 specific sem.h and includes sys/types.h instead
    of bits/types.h. All other archs include sys/types.h, too.
    Including bits/wordsize.h is obselete, because it is already inlcuded in
    sys/types.h -> bits/types.h.

    ChangeLog:

        * sysdeps/unix/sysv/linux/s390/bits/sem.h:
        Include sys/types.h instead of bits/types.h.
        Remove inclusion of bits/wordsize.h.

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

Summary of changes:
 ChangeLog                                          |   25 +++++
 NEWS                                               |    9 +-
 stdlib/Makefile                                    |    2 +
 stdlib/tst-makecontext.c                           |   41 +++++++-
 sysdeps/s390/fpu/libm-test-ulps                    |  108 ++++++++++++++++++-
 sysdeps/unix/sysv/linux/s390/bits/sem.h            |    3 +-
 .../sysv/linux/s390/s390-32/__makecontext_ret.S    |    8 ++
 .../sysv/linux/s390/s390-64/__makecontext_ret.S    |    8 ++
 8 files changed, 191 insertions(+), 13 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]