Skip to content
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

[release/8.0-staging] Fix a bug in PAL version of _vsnprint_f #103003

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 3, 2024

Backport of #98687 to release/8.0-staging

/cc @brianrob @jakobbotsch

Customer Impact

  • Customer reported
  • Found internally

Found by internal profiler developers. This causes incorrect symbols to be displayed in profiles captured on Linux because the symbols are truncated in the perf-%pid.map files generated by CoreCLR. Full details of how to repro are available in #102938.

Regression

  • Yes
  • No

The regression was introduced via #81243.

Testing

Fix was verified by cherry-picking this change locally and confirming that symbols are no longer truncated using a simple local repro.

Risk

Low. This is an off-by-one change that addresses when the full string cannot fit in the existing buffer.

When the formatted string cannot fully fit in the buffer (including its
null terminator) `_vsnprint_f` should return -1. However, in the case
where the number of chars was the same as the buffer size it was
returning the buffer size.
@brianrob brianrob added the Servicing-approved Approved for servicing release label Jun 3, 2024
@brianrob
Copy link
Member

brianrob commented Jun 3, 2024

Servicing approved via e-mail.

@brianrob brianrob merged commit cff625b into release/8.0-staging Jun 3, 2024
111 of 114 checks passed
@brianrob brianrob deleted the backport/pr-98687-to-release/8.0-staging branch June 3, 2024 21:53
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-PAL-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[.NET 8] Some Symbol Entries in perf-%pid.map Are Truncated
3 participants