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

JFR: Prevent chunk buffer overflows #20504

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Conversation

tajila
Copy link
Contributor

@tajila tajila commented Nov 4, 2024

Detect chunk buffer overflow and prevent subsequent writes to the buffer. Also, update chunk buffer size calculations.

Skip frames with incomplete data in stacktraces.

Add missing memory frees.

@tajila tajila requested a review from gacholio November 4, 2024 22:08
@tajila
Copy link
Contributor Author

tajila commented Nov 4, 2024

jenkins test sanity.functional xlinux jdk11

@tajila
Copy link
Contributor Author

tajila commented Nov 4, 2024

jenkins test sanity.functional alinux64 jdk11

@tajila tajila changed the title JFR: prevent chun buffer overflows JFR: prevent chunk buffer overflows Nov 4, 2024
@tajila tajila changed the title JFR: prevent chunk buffer overflows JFR: Prevent chunk buffer overflows Nov 4, 2024
@tajila
Copy link
Contributor Author

tajila commented Nov 5, 2024

@gacholio Please review these changes

Detect chunk buffer overflow and prevent subsequent writes to the buffer.
Also, update chunk buffer size calculations.

Skip frames with incomplete data in stacktraces.

Add missing memory frees.

Signed-off-by: tajila <[email protected]>
@gacholio
Copy link
Contributor

gacholio commented Nov 6, 2024

jenkins compile win,xlinux jdk21

@gacholio gacholio merged commit 24c86c0 into eclipse-openj9:master Nov 6, 2024
5 checks passed
Comment on lines +243 to 245
if (!_isLE) {
newVal = byteSwap(val);
}
Copy link
Contributor

@keithc-ca keithc-ca Nov 6, 2024

Choose a reason for hiding this comment

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

I don't think calling byteSwap() is appropriate for any platform here or in any writeLEB* method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ill address this

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.

3 participants