Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

umm_poison false positive from ISR#8914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mcspr merged 3 commits intoesp8266:masterfrommhightower83:pr-fix-umm_poison
Apr 28, 2023

Conversation

@mhightower83
Copy link
Contributor

@mhightower83mhightower83 commentedApr 22, 2023
edited
Loading

The umm_poison logic runs outside the UMM_CRITICAL_* umbrella. When interrupt routines do alloc calls, it is possible to interrupt an in-progress allocation just before the poison is set, with a new alloc request resulting in a false "poison check fail" against the in-progress allocation. The SDK does mallocs from ISRs. SmartConfig can illustrate this issue.

This shouldresolve#3494 (comment)

Other Sketches built with Debug: "Serial," that use the SDK's Promiscuous callbacks are also likely to encounter problems.
The SDK support for "Promiscuous Receive" allocates memory from an ISR context, occasionally interrupting the poison wrapper code before it finishes setting the poison fences resulting in afalse poison failed event.

Edited: expanded description

The umm_poison logic runs outside the UMM_CRITICAL_* umbrella. When interruptroutines do alloc calls, it is possible to interrupt an in-progress allocationjust before the poison is set, with a new alloc request resulting in a false"poison check fail" against the in-progress allocation. The SDK does mallocsfrom ISRs. SmartConfig can illustrate this issue.
@mcspr
Copy link
Collaborator

Any reason not to move currently separateumm_malloc andget_poisoned into a single operation that happens inside critical enter & exit blocks?
Adding a different false positive, other way around by ignoring the check with some specific counter value, feels kind of weird.

@mhightower83
Copy link
ContributorAuthor

The current upstream umm_malloc has umm_poison as an outer wrapper. Without searching through all the old stuff, it used to be more mixed together. I have already started to blur that separation withPOISON_CHECK_NEIGHBORS() inumm_malloc(). I'll look at movingget_poisoned() in as well. I will need to think about this a bit.realloc() gets tricky.

@mcsprmcspr merged commitc517bfd intoesp8266:masterApr 28, 2023
@mhightower83mhightower83 deleted the pr-fix-umm_poison branchJune 16, 2023 17:24
mhightower83 added a commit to mhightower83/Arduino that referenced this pull requestJul 8, 2023
Bug introduced with PRfixesp8266#8914.When a reallocated pointer could not grow in place, a replacementallocation was created. Then UMM_POISON was written to the wrong block.
mhightower83 added a commit to mhightower83/Arduino that referenced this pull requestJul 9, 2023
d-a-v pushed a commit that referenced this pull requestJul 18, 2023
* Fixes occasional UMM_POISON failureBug introduced with PRfix#8914.When a reallocated pointer could not grow in place, a replacementallocation was created. Then UMM_POISON was written to the wrong block.* Fix umm_poison data corruption on realloc when memory move is used.Bug introduced with PRfix#8914* refactored to resolve unused error in some build contexts
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull requestNov 18, 2024
The umm_poison logic runs outside the UMM_CRITICAL_* umbrella. When interrupt routines do alloc calls, it is possible to interrupt an in-progress allocation just before the poison is set, with a new alloc request resulting in a false "poison check fail" against the in-progress allocation. The SDK does mallocs from ISRs.SmartConfig can illustrate this issue, seeesp8266#3494 (comment)Other Sketches built with Debug: "Serial," that use the SDK's Promiscuous callbacks are also likely to encounter problems.The SDK support for "Promiscuous Receive" allocates memory from an ISR context, occasionally interrupting the poison wrapper code before it finishes setting the poison fences resulting in a false poison failed event.
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull requestNov 18, 2024
* Fixes occasional UMM_POISON failureBug introduced with PRfixesp8266#8914.When a reallocated pointer could not grow in place, a replacementallocation was created. Then UMM_POISON was written to the wrong block.* Fix umm_poison data corruption on realloc when memory move is used.Bug introduced with PRfixesp8266#8914* refactored to resolve unused error in some build contexts
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

No Poison after the block Error in Smartconfig

2 participants

@mhightower83@mcspr

[8]ページ先頭

©2009-2025 Movatter.jp