Skip to content

Fix sizeof in test allocator mock#396

Merged
PJK merged 1 commit into
masterfrom
fix-test-allocator-sizeof
Feb 8, 2026
Merged

Fix sizeof in test allocator mock#396
PJK merged 1 commit into
masterfrom
fix-test-allocator-sizeof

Conversation

@PJK

@PJK PJK commented Feb 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix sizeof(expectations) (pointer size) to sizeof(*expectations) (element size) in test/test_allocator.c
  • In practice this over-allocates on 64-bit (pointer > enum) so no runtime issue, but the intent is wrong

Test plan

  • All 26 tests pass (this is the foundation of all allocation-failure tests)

🤖 Generated with Claude Code

Use sizeof(*expectations) instead of sizeof(expectations) to get
the element size rather than the pointer size.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Feb 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (17d9433) to head (bc01665).
⚠️ Report is 27 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #396   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines         1663      1663           
=========================================
  Hits          1663      1663           

☔ 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.

@PJK
PJK merged commit 3cf1d7a into master Feb 8, 2026
16 of 18 checks passed
@PJK
PJK deleted the fix-test-allocator-sizeof branch February 8, 2026 18:48
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.

1 participant