Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Ignore thumb bit when checking for repeated frames #50

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

jonas-schievink
Copy link
Contributor

Hopefully fixes #46

@kaspar030
Copy link

This fixes it:

    Finished dev [optimized + debuginfo] target(s) in 2.59s
     Running `probe-run --chip nRF52840_xxAA target/thumbv7em-none-eabi/debug/app`
flashing program ..
DONE
resetting device
RTT logs not available; blocking until the device halts..
stack backtrace:
   0: 0x00000946 - <unknown>
   1: 0x000008aa - cortex_m_semihosting::hio::hstdout
   2: 0x000007ec - cortex_m_semihosting::export::hstdout_str::{{closure}}
   3: 0x0000071e - cortex_m::interrupt::free
   4: 0x000007d8 - cortex_m_semihosting::export::hstdout_str
   5: 0x0000045a - user_main
   6: 0x00001296 - riot_core::main_trampoline
   7: 0x00000fb2 - riot_core::thread::cleanup
error: the stack appears to be corrupted beyond this point

src/main.rs Outdated
@@ -581,7 +581,7 @@ fn backtrace(
break;
}

if !cfa_changed && lr == pc {
if !cfa_changed && lr & !1 == pc & !1 {
Copy link

@kaspar030 kaspar030 Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally I'd expect a comment on why the lsb is ignored. :)

Copy link
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but let's add a const

src/main.rs Outdated
@@ -581,7 +581,7 @@ fn backtrace(
break;
}

if !cfa_changed && lr == pc {
if !cfa_changed && lr & !1 == pc & !1 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move the 1 constant into a const THUMB_BIT or similar?

@jonas-schievink jonas-schievink merged commit dec2326 into main Sep 2, 2020
@jonas-schievink jonas-schievink deleted the unwind-ignore-thumb branch September 2, 2020 15:25
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stack trace infinite loop
3 participants