Skip to content

Prevents NuttX crashing if MM_REGIONS is too small.#460

Merged
patacongo merged 1 commit into
apache:pr460from
anpaza:fix-mmregions
Mar 6, 2020
Merged

Prevents NuttX crashing if MM_REGIONS is too small.#460
patacongo merged 1 commit into
apache:pr460from
anpaza:fix-mmregions

Conversation

@anpaza
Copy link
Copy Markdown
Contributor

@anpaza anpaza commented Mar 6, 2020

Added a DEBUGASSERT and a runtime check so that mm_region will not
overwrite critical heap data if user incorrectly defines MM_REGIONS.

Added a DEBUGASSERT and a runtime check so that mm_region will not
overwrite critical heap data if user incorrectly defines MM_REGIONS.
int IDX = heap->mm_nregions;

/* Writing past CONFIG_MM_REGIONS would have catastrophic consequences */
DEBUGASSERT(IDX < CONFIG_MM_REGIONS);
Copy link
Copy Markdown
Contributor

@patacongo patacongo Mar 6, 2020

Choose a reason for hiding this comment

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

Coding standard requires a blank line after each comment. tools/nxstyle should have caught this.

I will go ahead with the merge and correct that.

@patacongo patacongo changed the base branch from master to pr460 March 6, 2020 15:56
@patacongo patacongo merged commit 31a0a94 into apache:pr460 Mar 6, 2020
@anpaza anpaza deleted the fix-mmregions branch March 10, 2020 14:31
cwespressif pushed a commit to cwespressif/incubator-nuttx that referenced this pull request Apr 3, 2024
…_end

xtensa/esp32s3: Adjust MMU_END values
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