This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #18508] S390: Fix "backtrace() returns infinitely deep stack frames with makecontext()".
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Stefan Liebler <stli at linux dot vnet dot ibm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 7 Jul 2015 10:31:42 -0700
- Subject: Re: [PATCH][BZ #18508] S390: Fix "backtrace() returns infinitely deep stack frames with makecontext()".
- Authentication-results: sourceware.org; auth=none
- References: <ml71gu$et2$1 at ger dot gmane dot org> <557AA306 dot 4090208 at redhat dot com> <mleq97$5v2$1 at ger dot gmane dot org> <87eglhvsst dot fsf at igel dot home> <mlm3f3$bbu$1 at ger dot gmane dot org> <559651D0 dot 1030704 at redhat dot com>
On Fri, Jul 3, 2015 at 2:11 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 06/15/2015 10:47 AM, Stefan Liebler wrote:
>> +/* We do not want .eh_frame info for __makecontext_ret to stop unwinding
>> + if backtrace() was called within a context created by makecontext.
>> + (there is also no .eh_frame info for _start or thread_start) */
>
>> +/* We do not want .eh_frame info for __makecontext_ret to stop unwinding
>> + if backtrace() was called within a context created by makecontext.
>> + (there is also no .eh_frame info for _start or thread_start) */
>
> I think this should read:
>
> âWe do not want .eh_frame ifno so that __makecontext_ret stops unwinding
> if backtrace was called within a context created by makecontext. (There
> is also no .eh_frame info for _start or thread_start.)â
>
> Could a native speaker review this, please?
>
> Rest of the patch seems okay to me.
>
The new test failed on Fedora/22/ i686:
cf (i=-78) at tst-makecontext.c:50
50 {
(gdb)
55 if (i != othervar || thr != 94)
(gdb)
51 struct trace_arg arg = { .size = 100, .cnt = -1 };
(gdb)
55 if (i != othervar || thr != 94)
(gdb)
66 handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
(gdb)
67 if (handle != NULL)
(gdb)
66 handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
(gdb)
67 if (handle != NULL)
(gdb)
69 unwind_backtrace = dlsym (handle, "_Unwind_Backtrace");
(gdb)
70 if (unwind_backtrace != NULL)
(gdb)
72 unwind_backtrace (backtrace_helper, &arg);
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0xf7de14a1 in ?? () from /lib/libgcc_s.so.1
--
H.J.