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

added sanitization of samples with negative value #3627

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pickausernaame
Copy link

Resolves #3616

@Pickausernaame Pickausernaame requested a review from a team as a code owner October 14, 2024 18:33
@CLAassistant
Copy link

CLAassistant commented Oct 14, 2024

CLA assistant check
All committers have signed the CLA.

Comment on lines +1334 to +1338
for i := range x.Value {
if x.Value[i] < 0 {
x.Value[i] = 0
}
}
Copy link
Collaborator

@kolesnikovae kolesnikovae Oct 15, 2024

Choose a reason for hiding this comment

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

This is a little bit more complicated: we already do this sanitisation outside this function, in https://github.com/grafana/pyroscope/blob/main/pkg/pprof/pprof.go#L390-L394

In ad-hoc, profiles travel a different path, and this is handled here actually:
https://github.com/grafana/pyroscope/blob/main/pkg/og/structs/flamebearer/convert/convert.go#L205

Copy link
Collaborator

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @Pickausernaame! Could you please sign CLA and review comments? Thanks!

@kolesnikovae kolesnikovae self-assigned this Oct 18, 2024
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.

Malformed flame graph when importing delta heap profile from Go
3 participants