-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change message_queue indexing from pointer address to uint32_t (#2497)
This change fixes a memory corruption caused by message queue when the following scenario occurs: MESSAGE1 is enqueued (address #1) MESSAGE1 is put in progress by mq MESSAGE1 is destroyed by the app MESSAGE2 is enqueued (re-using address #1, which was made available by the previous step) MESSAGE2 is put in progress by the mq MESSAGE2 processing is marked as completed by the app > Here the message queue searches the list of in-progress messages by the message address in memory. Since MESSAGE2 now has the same address of MESSAGE1 (which was freed), message_queue picks the entry for MESSAGE1 for removing from the in-progress list, leaving MESSAGE2 behind.
- Loading branch information
Showing
4 changed files
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters