Skip to content

Improve alignment promise for empty AlignedData#76

Merged
shssoichiro merged 4 commits into
rust-av:mainfrom
FreezyLemon:improve-alignment-promise
May 8, 2026
Merged

Improve alignment promise for empty AlignedData#76
shssoichiro merged 4 commits into
rust-av:mainfrom
FreezyLemon:improve-alignment-promise

Conversation

@FreezyLemon
Copy link
Copy Markdown
Contributor

#74 uncovered that empty data/len==0 returned a dangling pointer that was not following the same alignment as real allocations. This required some doc changes and is just not nice in general.

Use layout.dangling_ptr instead of the less specific NonNull::dangling_ptr to follow our "usual" alignment rules exactly. This requires an MSRV bump to 1.95.

@FreezyLemon FreezyLemon changed the title Improve alignment promise Improve alignment promise for empty AlignedData May 7, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.40%. Comparing base (59bc0dc) to head (d84c738).

Files with missing lines Patch % Lines
src/plane/aligned.rs 93.54% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   99.40%   99.40%           
=======================================
  Files           7        7           
  Lines         668      676    +8     
=======================================
+ Hits          664      672    +8     
  Misses          4        4           

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

@shssoichiro shssoichiro merged commit b8f193c into rust-av:main May 8, 2026
10 of 11 checks passed
@FreezyLemon FreezyLemon deleted the improve-alignment-promise branch May 8, 2026 10:56
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