Skip to content

Fix crash in avl_array (string table) on Playdate console#150

Merged
JBenda merged 1 commit into
JBenda:masterfrom
harryr0se:fix-crash-on-embedded-arm-devices
May 27, 2026
Merged

Fix crash in avl_array (string table) on Playdate console#150
JBenda merged 1 commit into
JBenda:masterfrom
harryr0se:fix-crash-on-embedded-arm-devices

Conversation

@harryr0se
Copy link
Copy Markdown
Contributor

The avl_array tree structure expects the values in the balance_ array to be a signed to function correctly and causes memory corruption issues if it's not.

The array type was changed from std::uint8_t to char here #143 to avoid depending on STL, which makes sense

The issue is that on certain devices like the Playdate (Arm Cortex M7) char defaults to an unsigned type, this PR makes sure that the code is explicit in requiring a signed char and fixes the crash

…, 'char' making this explicit fixes memory corruption issues on some embedded arm devices like the Playdate
@github-actions
Copy link
Copy Markdown

Ink Proof Results

These results are obtained by running the Ink-Proof Testing Suite on the compiled binaries in this pull request.

System Results
Linux x64 130/130 passed
MacOSX-ARM DISABLED
MacOSX DISABLED
Windows x64 130/130 passed

@JBenda
Copy link
Copy Markdown
Owner

JBenda commented May 27, 2026

Thanks for the PR.

It seems that implicit behavior will bite quite often.

@JBenda JBenda merged commit 6d90017 into JBenda:master May 27, 2026
7 of 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.

2 participants