Commit b51e744
spi/heap: address Copilot review feedback on #4360
furi_hal_spi.c (TX-only DMA path):
On timeout the cleanup unconditionally released spi_dma_completed
while LL_DMA_DisableIT_TC was issued *after*. A late or pending DMA
completion ISR would then call furi_semaphore_release() on an already
full binary semaphore and crash furi_check. Disable TC IRQ and clear
the pending TC flag before releasing the semaphore so the ISR cannot
double-release.
memmgr_heap.c (memmgr_heap_get_block_size):
Add heapVALIDATE_BLOCK_POINTER(pxLink) to match vPortFree(). Without
it a caller passing an invalid pointer through this public API would
read out of bounds before the configASSERT fires.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 06b1992 commit b51e744
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
553 | 554 | | |
554 | 555 | | |
555 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
300 | 311 | | |
301 | 312 | | |
302 | 313 | | |
303 | | - | |
304 | 314 | | |
305 | 315 | | |
306 | 316 | | |
| |||
0 commit comments