-
-
Notifications
You must be signed in to change notification settings - Fork 74
stack trace infinite loop #46
Comments
Thanks for the report! #47 should fix the behavior of Ctrl+C while the backtrace is being generated. To investigate the broken backtrace, it would be great if you could provide the source code of |
in these situations we should check both the PC (printed) and SP (not printed); if both haven't changed in one iteration then the virtual unwinder has gotten stuck and we should stop it and print an error message. (I thought there was already some logic to check for this condition but maybe not) |
We do have such a check, but it seems like that isn't enough: Lines 579 to 582 in e1964b8
|
@kaspar030 It would be great if you could re-run this on the current |
Done, here's the end of the output:
I guess the thumb bit needs to be ignored in the check that's mentioned above. |
Yeah that sounds like the right fix. Can you try with #50 to see if that fixes it? |
Thanks a bunch! |
I'm just getting started using probe-run, testing a threading crate I'm building.
So (on Cortex-M), the thread stacks are populated with a frame like an exception would do,
[r0-r4, r12, LR, PC, APSR]
.LR is set to the location of a
cleanup()
, which does some house-keeping, then triggers the scheduler to switch away, then does aloop {}
, which is practically unreachable.Now when I run something with probe-run, the resulting stack trace endlessly repeats in cleanup():
The lines
<N>: 0x00000d20 - riot_core::thread::cleanup
repeat extremely fast, and the process cannot be cancelled with CTRL-C.While I might have messed up something on the stack to make it invalid and look like this to probe-run, I'd expect it to stop after maybe the second iteration, letting the user know that this would repeat.
(I'm assuming that probe-run's rtt support uses a different BKPT scheme than traditional semihosting, and that's why this exits on the first
hprintln!()
, but that is a unrelated to this issue.)This is on probe-run 0.1.3 installed today via "cargo install probe-run".
The text was updated successfully, but these errors were encountered: