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

fix: the retrieve plan on heap is used after free when reduce #38840

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/querynodev2/segments/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@
})
futures = append(futures, future)
}
if err := conc.AwaitAll(futures...); err != nil {
// Must be BlockOnAll operation here.
// If we perform a fast fail here, the cgo struct like `plan` will be used after free, unsafe memory access happens.
if err := conc.BlockOnAll(futures...); err != nil {

Check warning on line 550 in internal/querynodev2/segments/result.go

View check run for this annotation

Codecov / codecov/patch

internal/querynodev2/segments/result.go#L550

Added line #L550 was not covered by tests
return nil, err
}

Expand Down
Loading