Skip to content

Fix: remove incorrect assert in utils_align_ptr_up_size_down()#977

Merged
KFilipek merged 2 commits into
oneapi-src:v0.10.xfrom
ldorau:Remove_incorrect_assert_in_utils_align_ptr_up_size_down
Dec 10, 2024
Merged

Fix: remove incorrect assert in utils_align_ptr_up_size_down()#977
KFilipek merged 2 commits into
oneapi-src:v0.10.xfrom
ldorau:Remove_incorrect_assert_in_utils_align_ptr_up_size_down

Conversation

@ldorau

@ldorau ldorau commented Dec 6, 2024

Copy link
Copy Markdown
Contributor

Description

Remove incorrect assert in utils_align_ptr_up_size_down().
A pointer is aligned, but a size is only adjusted to the new pointer.
The size does not have to be aligned.

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 December 6, 2024 16:12

@lukaszstolarczuk lukaszstolarczuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do you have a test for that? 😉

Remove incorrect assert in utils_align_ptr_up_size_down().
A pointer is aligned, but a size is only adjusted to the new pointer.
The size does not have to be aligned.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
@ldorau ldorau force-pushed the Remove_incorrect_assert_in_utils_align_ptr_up_size_down branch from c0f247b to b2605ba Compare December 9, 2024 14:27
@ldorau

ldorau commented Dec 9, 2024

Copy link
Copy Markdown
Contributor Author

do you have a test for that? 😉

@lukaszstolarczuk Tests added

Comment thread test/utils/utils_linux.cpp
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
@ldorau ldorau force-pushed the Remove_incorrect_assert_in_utils_align_ptr_up_size_down branch from b2605ba to dd47ffc Compare December 9, 2024 14:53
@ldorau ldorau requested a review from KFilipek December 9, 2024 14:53
@ldorau

ldorau commented Dec 10, 2024

Copy link
Copy Markdown
Contributor Author

@lukaszstolarczuk @KFilipek please re-review

@lukaszstolarczuk lukaszstolarczuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍

@KFilipek KFilipek merged commit a094b44 into oneapi-src:v0.10.x Dec 10, 2024
@ldorau ldorau deleted the Remove_incorrect_assert_in_utils_align_ptr_up_size_down branch December 10, 2024 11:04
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.

4 participants