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

Flush if needed before writing UTF-8 symbols and thread names #739

Conversation

richardstartin
Copy link

Since the max UTF-8 string length is 8191 and flushes are only triggered when there is less than 4KiB left in each JFR buffer, an (albeit abnormally long) thread name or symbol longer than 4KiB can wrap around and corrupt the offset at the start of the next buffer, unless the buffer is the last buffer in which case it will just overflow.

apangin added a commit that referenced this pull request Apr 1, 2023
@apangin
Copy link
Collaborator

apangin commented Apr 1, 2023

Thanks for pointing this out.
I pushed a slightly changed fix.

@apangin apangin closed this Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants