Deadloop _Unwind_Backtrace noexcept
Bug #1318478 reported by
Joey Ye
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Following case runs into a dead loop on all Cortex-M. Correctness of this case is verified on i386. It also works if removing noexcept from foo
Command line:
arm-none-eabi-g++ -mthumb -mcpu=cortex-m3 -std=c++11 -specs=rdimon.specs
#include <unwind.h>
#include <stdio.h>
_Unwind_Reason_Code trace_func(struct _Unwind_Context * context, void* arg) {
void *ip = (void *)_Unwind_
printf("Address: %p\n", ip);
return _URC_NO_REASON;
}
void bar()
{
puts("This is in bar");
void foo() noexcept
{
bar();
}
int main()
{
foo();
return 0;
}
Changed in gcc-arm-embedded: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
description: | updated |
Changed in gcc-arm-embedded: | |
status: | Confirmed → Fix Committed |
milestone: | none → 4.9-2014-q4-major |
Changed in gcc-arm-embedded: | |
milestone: | 4.9-2014-q4-major → 4.9-2015-q1-update |
Changed in gcc-arm-embedded: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Joey,
Thanks for following up with this. I meant to try and do a simple example
this weekend, but I was working on other issues (trying to get the iMX6 to
drive two monitors with a single IPU (for EMC testing).
We may have a workaround, the boot library has a BOOST_NO_NOEXCEPT macro
that disables all the noexcept methods. I am going to try rebuilding our
app with that and see if the stack traces clear up.
Thanks,
Jackson
On Sun, May 11, 2014 at 9:57 PM, Joey Ye <email address hidden> wrote:
> Public bug reported: GetIP(context) ; Backtrace( (_Unwind_ Trace_Fn) &trace_ func, nullptr); } GetIP(context) ; GetIP(context) ; Backtrace( (_Unwind_ Trace_Fn) &trace_ func, nullptr); } Backtrace( (_Unwind_ Trace_Fn) &trace_ func, nullptr); } /bugs.launchpad .net/bugs/ 1318478
>
> Following case runs into a dead loop on all Cortex-M. Correctness of
> this case is verified on i386. It also works if removing noexcept from
> foo
>
> Command line:
> arm-none-eabi-g++ -mthumb -mcpu=cortex-m3 -std=c++11 -specs=rdimon.specs
>
> #include <unwind.h>
> #include <stdio.h>
>
> _Unwind_Reason_Code trace_func(struct _Unwind_Context * context, void*
> arg) {
> void *ip = (void *)_Unwind_
> printf("Address: %p\n", ip);
> return _URC_NO_REASON;
> }
>
> void bar()
> {
> puts("This is in bar");
> _Unwind_
>
> void foo() noexcept
> {
> bar();
> }
>
> int main()
> {
> foo();
> return 0;
> }
>
> ** Affects: gcc-arm-embedded
> Importance: Medium
> Status: Confirmed
>
> ** Changed in: gcc-arm-embedded
> Status: New => Confirmed
>
> ** Changed in: gcc-arm-embedded
> Importance: Undecided => Medium
>
> ** Description changed:
>
> Following case runs into a dead loop on all Cortex-M. Correctness of
> this case is verified on i386. It also works if removing noexcept from
> foo
> +
> + Command line:
> + arm-none-eabi-g++ -mthumb -mcpu=cortex-m3 -std=c++11 -specs=rdimon.specs
>
> #include <unwind.h>
> #include <stdio.h>
>
> _Unwind_Reason_Code trace_func(struct _Unwind_Context * context, void*
> arg) {
> - void *ip = (void *)_Unwind_
> - printf("Address: %p\n", ip);
> - return _URC_NO_REASON;
> + void *ip = (void *)_Unwind_
> + printf("Address: %p\n", ip);
> + return _URC_NO_REASON;
> }
> -
>
> void bar()
> {
> - puts("This is in bar");
> - _Unwind_
> + puts("This is in bar");
> + _Unwind_
>
> void foo() noexcept
> {
> - bar();
> + bar();
> }
>
> int main()
> {
> - foo();
> - return 0;
> + foo();
> + return 0;
> }
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Deadloop _Unwind_Backtrace noexcept
>
> Status in GNU Tools for ARM Embedded Processors:
> Confirmed
>
> Bug description:
> Following case runs into a dead loop on all Cortex-M. Correctness of
> this case is verified on i386. It also works if removing noexcept from
> foo
>
> Command line:
> arm-none-eabi-g++ -mthumb -mcpu=cortex-m3 -std=c++11 -specs=rdimon.specs
>
> #include <unwind.h>
> #include <stdio.h>
>
> _Unwind_Reason_Code trace_func(struct _Unwind_Conte...