public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext().
@ 2015-06-09 15:41 stli at linux dot vnet.ibm.com
  2015-06-10  7:04 ` [Bug libc/18508] " ian at airs dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: stli at linux dot vnet.ibm.com @ 2015-06-09 15:41 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 18508
           Summary: S390: backtrace() returns infinitely deep stack frames
                    with makecontext().
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: stli at linux dot vnet.ibm.com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

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).

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/18508] S390: backtrace() returns infinitely deep stack frames with makecontext().
  2015-06-09 15:41 [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext() stli at linux dot vnet.ibm.com
@ 2015-06-10  7:04 ` ian at airs dot com
  2015-06-10  8:26 ` e29253 at jp dot ibm.com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ian at airs dot com @ 2015-06-10  7:04 UTC (permalink / raw)
  To: glibc-bugs

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

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/18508] S390: backtrace() returns infinitely deep stack frames with makecontext().
  2015-06-09 15:41 [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext() stli at linux dot vnet.ibm.com
  2015-06-10  7:04 ` [Bug libc/18508] " ian at airs dot com
@ 2015-06-10  8:26 ` e29253 at jp dot ibm.com
  2015-06-10 13:25 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: e29253 at jp dot ibm.com @ 2015-06-10  8:26 UTC (permalink / raw)
  To: glibc-bugs

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

e29253 at jp dot ibm.com <e29253 at jp dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |e29253 at jp dot ibm.com

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/18508] S390: backtrace() returns infinitely deep stack frames with makecontext().
  2015-06-09 15:41 [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext() stli at linux dot vnet.ibm.com
  2015-06-10  7:04 ` [Bug libc/18508] " ian at airs dot com
  2015-06-10  8:26 ` e29253 at jp dot ibm.com
@ 2015-06-10 13:25 ` fweimer at redhat dot com
  2015-07-07 14:13 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2015-06-10 13:25 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/18508] S390: backtrace() returns infinitely deep stack frames with makecontext().
  2015-06-09 15:41 [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext() stli at linux dot vnet.ibm.com
                   ` (2 preceding siblings ...)
  2015-06-10 13:25 ` fweimer at redhat dot com
@ 2015-07-07 14:13 ` cvs-commit at gcc dot gnu.org
  2015-07-07 14:17 ` stli at linux dot vnet.ibm.com
  2015-07-21 16:13 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-07-07 14:13 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/18508] S390: backtrace() returns infinitely deep stack frames with makecontext().
  2015-06-09 15:41 [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext() stli at linux dot vnet.ibm.com
                   ` (3 preceding siblings ...)
  2015-07-07 14:13 ` cvs-commit at gcc dot gnu.org
@ 2015-07-07 14:17 ` stli at linux dot vnet.ibm.com
  2015-07-21 16:13 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: stli at linux dot vnet.ibm.com @ 2015-07-07 14:17 UTC (permalink / raw)
  To: glibc-bugs

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

Stefan Liebler <stli at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Stefan Liebler <stli at linux dot vnet.ibm.com> ---
Fixed upstream. See Comment 1:
S390: Fix "backtrace() returns infinitely deep stack frames with makecontext()"
[BZ #18508].

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/18508] S390: backtrace() returns infinitely deep stack frames with makecontext().
  2015-06-09 15:41 [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext() stli at linux dot vnet.ibm.com
                   ` (4 preceding siblings ...)
  2015-07-07 14:17 ` stli at linux dot vnet.ibm.com
@ 2015-07-21 16:13 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-07-21 16:13 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 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  0ac4f1dab3e5778c79994a89111b4eb1d247ab12 (commit)
      from  f30d94a74a30b832354d4b87c23a4909ed24b929 (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=0ac4f1dab3e5778c79994a89111b4eb1d247ab12

commit 0ac4f1dab3e5778c79994a89111b4eb1d247ab12
Author: Chris Metcalf <cmetcalf@ezchip.com>
Date:   Tue Jul 21 12:04:52 2015 -0400

    tile: Fix BZ #18508 (makecontext yield infinite backtrace)

    It turns out tile suffered from the same problem as S390.  However,
    disabling CFI information for the __startcontext on tile was not
    sufficient to fix the problem; I think the backtracer will just
    blindly try to follow the link register (lr) in that case.

    Instead, the change adds a cfi_undefined directive for "lr"
    and then arranges to call __startcontext directly when the new
    context starts, rather than just synthesizing a return to it.
    In addition to being a bit easier now to understand the control
    flow, this also allows the cfi_undefined directive to be placed in
    a way that causes it to be in force at the address that the "lr"
    from the called function points to.

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

Summary of changes:
 ChangeLog                                  |    7 +++++++
 sysdeps/unix/sysv/linux/tile/makecontext.c |    8 ++++----
 sysdeps/unix/sysv/linux/tile/setcontext.S  |    2 ++
 3 files changed, 13 insertions(+), 4 deletions(-)

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-21 16:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-09 15:41 [Bug libc/18508] New: S390: backtrace() returns infinitely deep stack frames with makecontext() stli at linux dot vnet.ibm.com
2015-06-10  7:04 ` [Bug libc/18508] " ian at airs dot com
2015-06-10  8:26 ` e29253 at jp dot ibm.com
2015-06-10 13:25 ` fweimer at redhat dot com
2015-07-07 14:13 ` cvs-commit at gcc dot gnu.org
2015-07-07 14:17 ` stli at linux dot vnet.ibm.com
2015-07-21 16:13 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).