Skip to content

Don't create an intermediate &[u8] when initializing Tlsf alloc - #110

Merged
zeenix merged 1 commit into
rust-embedded:masterfrom
jamesmunns:james/fix-ub
Nov 25, 2025
Merged

Don't create an intermediate &[u8] when initializing Tlsf alloc#110
zeenix merged 1 commit into
rust-embedded:masterfrom
jamesmunns:james/fix-ub

Conversation

@jamesmunns

Copy link
Copy Markdown
Member

I think this fully fixes #108 - by no longer creating an intermediary &[u8], this should remove the source of UB, assuming that Tlsf does not require the backing storage to be initialized.

@zeenix zeenix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Had to really scratch me head to understand what's going on but LGTM.

@zeenix
zeenix added this pull request to the merge queue Nov 25, 2025
Merged via the queue into rust-embedded:master with commit 9f13866 Nov 25, 2025
8 checks passed
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.

Main example, init code has extensive undefined behavior

2 participants