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(regression): reverts grafana/loki#13039 to prevent use-after-free corruptions #13162

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Jun 6, 2024

Temporarily reverts #13039

Looks like that PR breaks the conventions around pool reuse (to safeguard use-after-free memory corruptions) described here and here.

@owen-d owen-d requested a review from a team as a code owner June 6, 2024 19:39
@owen-d owen-d merged commit 41c5ee2 into main Jun 6, 2024
60 checks passed
@owen-d owen-d deleted the revert-13039-chaudum/allocator branch June 6, 2024 19:47
@chaudum
Copy link
Contributor

chaudum commented Jun 7, 2024

Looks like that PR breaks the conventions around pool reuse (to safeguard use-after-free memory corruptions) described here and here.

I don't think that is the case. When obtaining a BlockQuerier on the write path (here), it is instantiated with the SimpleHeapAllocator, which does not re-cycle any buffers when Put() is called (here)

chaudum added a commit that referenced this pull request Jun 7, 2024
…ruptions (#13162)"

This reverts commit 41c5ee2.

Signed-off-by: Christian Haudum <[email protected]>
chaudum added a commit that referenced this pull request Jun 7, 2024
---

Revert "fix(regression):  reverts #13039 to prevent use-after-free corruptions (#13162)"

This reverts commit 41c5ee2.

Signed-off-by: Christian Haudum <[email protected]>
chaudum added a commit that referenced this pull request Jun 7, 2024
---

Revert "fix(regression):  reverts #13039 to prevent use-after-free corruptions (#13162)"

This reverts commit 41c5ee2.

Signed-off-by: Christian Haudum <[email protected]>
chaudum added a commit that referenced this pull request Jun 7, 2024
---

Revert "fix(regression):  reverts #13039 to prevent use-after-free corruptions (#13162)"

This reverts commit 41c5ee2.

Signed-off-by: Christian Haudum <[email protected]>
chaudum added a commit that referenced this pull request Jun 10, 2024
---

Revert "fix(regression):  reverts #13039 to prevent use-after-free corruptions (#13162)"

This reverts commit 41c5ee2.

Signed-off-by: Christian Haudum <[email protected]>
chaudum added a commit that referenced this pull request Jun 19, 2024
---

Revert "fix(regression):  reverts #13039 to prevent use-after-free corruptions (#13162)"

This reverts commit 41c5ee2.

Signed-off-by: Christian Haudum <[email protected]>
chaudum added a commit that referenced this pull request Jun 20, 2024
This PR re-introduces the fixed size memory pool that was originally introduced with #13039 but reverted with #13162
Additionally, it removes the package-global variable to store the type of allocator that should be used. Instead, the allocator type is passed during the bloom store creation.

Signed-off-by: Christian Haudum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants