mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
thread_get_debug_info() computes the current stack usage as stack_used_current * 100 / thread->stack_size with no guard against a zero stack size. On hosted targets the main thread has stack_size == 0, so opening the "View OS stacks" debug screen divides by zero and panics with a floating point exception. Guard the division and report 0% when the stack size is unknown, which matches the stack_usage() helper. Likely affects all hosted non-SDL targets, but tested/confirmed on my HiBy R1. Change-Id: I8ecc56f53f1e97e8a59ca71c0e08a66093fecbae |
||
|---|---|---|
| .. | ||
| include | ||
| corelock.c | ||
| kernel-internal.h | ||
| mrsw_lock.c | ||
| mutex.c | ||
| queue.c | ||
| semaphore.c | ||
| thread-common.c | ||
| thread-internal.h | ||
| thread.c | ||
| tick.c | ||
| timeout.c | ||