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 umf_ba_free() - do not assert on unknown pointer #906

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Nov 18, 2024

Description

Fix umf_ba_free() - do not assert on unknown pointer.

Ref: #903

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@ldorau ldorau requested a review from a team as a code owner November 18, 2024 10:49
@ldorau ldorau force-pushed the Fix_umf_ba_free_-_do_not_assert_on_unknown_pointer branch from 04f4a6d to 15ec788 Compare November 18, 2024 10:50
@@ -278,7 +278,11 @@ void umf_ba_free(umf_ba_pool_t *pool, void *ptr) {
umf_ba_chunk_t *chunk = (umf_ba_chunk_t *)ptr;

utils_mutex_lock(&pool->metadata.free_lock);
assert(pool_contains_pointer(pool, ptr));
if (!pool_contains_pointer(pool, ptr)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why should we remove this assert. It was able to catch the issue #903. With this PR we just disable it and issue become silent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right :-)

@ldorau ldorau closed this Nov 18, 2024
@ldorau ldorau deleted the Fix_umf_ba_free_-_do_not_assert_on_unknown_pointer branch November 18, 2024 10:57
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.

2 participants