Skip to content

fix esp32p4 heap overlap and flash init bugs - #22

Closed
sylvioalves wants to merge 1 commit into
tannewt:zephyr_p4from
sylvioalves:bugfix/p4-bringup
Closed

sylvioalves wants to merge 1 commit into
tannewt:zephyr_p4from
sylvioalves:bugfix/p4-bringup

Conversation

@sylvioalves

@sylvioalves sylvioalves commented Aug 7, 2026 •

Copy link
Copy Markdown

The libc malloc arena was unbounded, so it extended from _end to the end of the chosen SRAM node and overlapped the nocache region handed to the TLSF pools. Both allocators wrote metadata to the same bytes, causing a kernel panic on the first free. Bound the arena so the regions stay disjoint.

Also initialize two variables in the flash init heuristic that could be read before assignment, drop the debug tracing from flash init, and remove the CDC ACM console nodes that the board does not use.

The libc malloc arena was unbounded, so it extended from _end
to the end of the chosen SRAM node and overlapped the nocache
region handed to the TLSF pools. Both allocators wrote metadata
to the same bytes, causing a kernel panic on the first free.
Bound the arena so the regions stay disjoint.

Also initialize two variables in the flash init heuristic that
could be read before assignment, drop the debug tracing from
flash init, and remove the CDC ACM console nodes that the board
does not use.

Signed-off-by: Sylvio Alves <[email protected]>
@sylvioalves sylvioalves closed this by deleting the head repository Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant