Skip to content

Fix disjoint_pool unit tests #1053

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

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Jan 23, 2025

Description

The UMF tests should not use the default system allocator to allocate memory, because they may not work correctly under the UMF proxy library when they and the proxy library are dynamically linked with the same libumf.so file.

In such case the same tracker is used in both: the test and the proxy library, so there may be conflicts of memory allocations. An allocation made originally by the the default system allocator in the test is first added to the tracker by the proxy library (which replaced the system allocator) and then the test itself tries to add the same pointer to the same tracker in the tracking provider of the pool that had made this allocation.

Fixes: #240

Checklist

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

The UMF tests should not use the default system allocator
to allocate memory, because they may not work correctly
under the UMF proxy library when they and the proxy library
are dynamically linked with the same libumf.so file.

In such case the same tracker is used in both:
the test and the proxy library, so there may be conflicts
of memory allocations. An allocation made originally
by the the default system allocator in the test
is first added to the tracker by the proxy library
(which replaced the system allocator) and then the test
itself tries to add the same pointer to the same tracker
in the tracking provider of the pool that had made
this allocation.

Fixes: oneapi-src#240

Signed-off-by: Lukasz Dorau <[email protected]>
@ldorau ldorau requested a review from a team as a code owner January 23, 2025 08:37
@ldorau ldorau merged commit 3f14f08 into oneapi-src:main Jan 23, 2025
78 checks passed
@ldorau ldorau deleted the Fix_disjoint_pool_unit_tests branch January 23, 2025 09:26
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.

The proxy library with jemalloc pool can work incorrectly if the app it is loaded for links with libumf.so
3 participants