-
Notifications
You must be signed in to change notification settings - Fork 845
Aligned memory allocation fixes and enhancements #4360
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LeonidGoltsblat
wants to merge
13
commits into
pjsip:master
Choose a base branch
from
LeonidGoltsblat:Aligned-memory-allocation-fixes-and-enhancements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Aligned memory allocation fixes and enhancements #4360
LeonidGoltsblat
wants to merge
13
commits into
pjsip:master
from
LeonidGoltsblat:Aligned-memory-allocation-fixes-and-enhancements
Conversation
This file contains hidden or 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
Looks like it failed pjlib test. |
fixed! Thanks! |
sauwming
approved these changes
Mar 20, 2025
Create a non-expandable pool and request more memory than is left in the current block
request only 1 byte with extra large alignment which should goes out of block
The bug in pjsip#4389 (when PJ_POOL_ALIGN_PTR(block->cur, alignment) > block->end) is not yet reproducible consistently on all platforms. The test is temporarily disabled.
…ignment) > block->end
…ignment) > block->end more diagnostics
…ignment) > block->end diagnostics/2
In response to #4389, #4391, added a test to check PJ_POOL_ALIGN_PTR(block->cur, alignment) > block->end condition ptr = PJ_POOL_ALIGN_PTR(block->cur, alignment);
if (ptr + size <= block->end) {
block->cur = ptr + size;
return ptr;
} This is very strange, but the test shows that this original PJSIP code can allocate memory out of block on Ubuntu and MacOS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is minor fixes and improving to #4277
Invalid syntax in the pool_i.h fixed: both pj_pool_aligned_alloc and pj_pool_aligned_create was defined with PJ_IDECL but should be defined with PJ_IDEF
Improving :