Add a check on the page heap size if the user uses the page heap APIs
- Dominant language
- C
- Stars
- 135
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
Currently an app that does not call the `UVISOR_SET_PAGE_HEAP_SIZE()` macros but uses the page heap APIs will compile fine but fail at runtime in an unpredictable way.
We must add a runtime check that checks the size of the page heap and fails with `HALT_ERROR` if it's 0 the first time the user uses a page heap API.
When the page heap APIs are not used the check is not needed, as the app is supposed to work just fine.
@meriac @niklas-arm @Patater
Contributor guide
Research direction
Start by locating the UVISOR_SET_PAGE_HEAP_SIZE() macros, the page heap APIs, and HALT_ERROR handling in the repository. Trace the first page heap API use and verify that a zero configured heap causes HALT_ERROR, while applications that do not use page heap APIs remain unaffected; add or update a regression test if the existing test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100