Skip to content

Conversation

claeusdev
Copy link

closes #725

This commit introduces 2 new functions to add support for free_sized and free_aligned_sized deallocators introduced in c23.

Tests ensure that free_sized and free_aligned_sized are skipped if unavailable otherwise we get a FREE record recorded for them.

This commit introduces 2 new functions to add support for
`free_sized` and `free_aligned_sized` deallocators introduced in
c23.

We ensure that `free_sized` and `free_aligned_sized` are skipped if
unavailable otherwise we get a `FREE` record recorded for them.

Signed-off-by: Nana Adjei Manu <[email protected]>
Copy link
Contributor

@godlygeek godlygeek left a comment

Choose a reason for hiding this comment

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

This looks like a good start, but I see a lot of things here that don't look right.

Remove `glibc` guards for new functions to support all libc
implementations.

Updates tests to skip if compilation fails on a specific platform.

Signed-off-by: Nana Adjei Manu <[email protected]>
@claeusdev claeusdev requested a review from godlygeek August 29, 2025 16:07
Update line number assertions in three failing integration tests to match
current file structure after recent code additions. The tests were failing
due to line number shifts caused by:

- Addition of C23 deallocator support tests
- Code review improvements

Tests affected:
- test_misbehaving_extension: 83 → 85
- test_extension_that_uses_pygilstate_ensure: 154 → 156, 155 → 157
- test_native_dlopen: 226 → 228

Signed-off-by: Nana Adjei Manu <[email protected]>
@claeusdev claeusdev force-pushed the support_new_deallocators branch from 653f4e6 to 79ca2a2 Compare August 29, 2025 18:05
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2025

Codecov Report

❌ Patch coverage is 20.40816% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.81%. Comparing base (2d96931) to head (79ca2a2).

Files with missing lines Patch % Lines
tests/integration/test_extensions.py 23.25% 33 Missing ⚠️
src/memray/_memray/hooks.cpp 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #817      +/-   ##
==========================================
- Coverage   92.16%   91.81%   -0.36%     
==========================================
  Files          95       95              
  Lines       11936    11981      +45     
  Branches      412      414       +2     
==========================================
- Hits        11001    11000       -1     
- Misses        935      981      +46     
Flag Coverage Δ
cpp 91.81% <20.40%> (-0.36%) ⬇️
python_and_cython 91.81% <20.40%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Intercept new free_sized and free_aligned_sized functions
3 participants