Skip to content

[mono] Fix aot profiler buffer resizing#128317

Open
BrzVlad wants to merge 1 commit into
dotnet:mainfrom
BrzVlad:fix-mono-aot-profiler
Open

[mono] Fix aot profiler buffer resizing#128317
BrzVlad wants to merge 1 commit into
dotnet:mainfrom
BrzVlad:fix-mono-aot-profiler

Conversation

@BrzVlad
Copy link
Copy Markdown
Member

@BrzVlad BrzVlad commented May 18, 2026

Fixes scenario where the new needed size is greater than double of the previous size

Fixes scenario where the new needed size is greater than double of the previous size
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a buffer-resize bug in the Mono AOT profiler where doubling the buffer once was insufficient when the required size exceeded twice the current capacity, leading to an under-sized allocation.

Changes:

  • Compute the required size up front and loop-double new_len until it satisfies the requested capacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants