Skip to content

Prove and consume the Unaligned alignment law - #3862

Open
joshlf wants to merge 1 commit into
Gi4f4vhkj7z3stqqcu5unrzfoqwqp3tucfrom
Gw5blxfy2ukqgizynv5tybeaa67xgzkmj
Open

joshlf wants to merge 1 commit into
Gi4f4vhkj7z3stqqcu5unrzfoqwqp3tucfrom
Gw5blxfy2ukqgizynv5tybeaa67xgzkmj

Conversation

@joshlf

@joshlf joshlf commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Declare Unaligned's alignment-one promise in its Rust documentation. Prove
the extracted built-in u8 implementation and exercise generic callers,
callee-proof reuse, a concrete caller, and an unused bound whose law must
remain in the theorem domain. Use that law to prove a zero-free unsafe
NonZeroUsize construction followed by ordinary division. The guarded
standard-library interpretation rejects zero as forbidden execution,
even when a caller discards the result or subsequently diverges.
The concrete byte caller discharges the selected implementation's
law.

Interpret the byte carrier's ABI alignment explicitly as one, checked by
the native compile-time layout fixture. Other carriers retain the abstract
alignment data input. The compiled audit checks that complete interpretation,
so the byte theorem cannot silently constrain every generic alignment.

Authored by an AI agent acting on joshlf's behalf.


Latest Update: v17 — Compare vs v16

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/Gw5blxfy2ukqgizynv5tybeaa67xgzkmj && git checkout -b pr-Gw5blxfy2ukqgizynv5tybeaa67xgzkmj FETCH_HEAD

Checkout

git fetch origin refs/heads/Gw5blxfy2ukqgizynv5tybeaa67xgzkmj && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/Gw5blxfy2ukqgizynv5tybeaa67xgzkmj && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/Gw5blxfy2ukqgizynv5tybeaa67xgzkmj

Stacked PRs enabled by GHerrit.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T21:35:43.886745Z 7082e87 PR opened
🔒 Security Review ✅ Completed 2026-10-13T21:37:41.005400Z 7082e87 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@joshlf
joshlf force-pushed the Gw5blxfy2ukqgizynv5tybeaa67xgzkmj branch from a9553ab to 33c6b9b Compare October 14, 2026 21:43
@joshlf
joshlf force-pushed the Gi4f4vhkj7z3stqqcu5unrzfoqwqp3tuc branch from 40710ff to 005f10a Compare October 14, 2026 21:43
@joshlf
joshlf force-pushed the Gw5blxfy2ukqgizynv5tybeaa67xgzkmj branch from 33c6b9b to e320074 Compare October 15, 2026 00:40
@joshlf
joshlf force-pushed the Gi4f4vhkj7z3stqqcu5unrzfoqwqp3tuc branch from 33b6c98 to 9546189 Compare October 15, 2026 01:19
@joshlf
joshlf force-pushed the Gw5blxfy2ukqgizynv5tybeaa67xgzkmj branch from e320074 to 56b7eaf Compare October 15, 2026 01:19
@joshlf
joshlf force-pushed the Gi4f4vhkj7z3stqqcu5unrzfoqwqp3tuc branch from 9546189 to 791f048 Compare October 15, 2026 04:53
@joshlf
joshlf force-pushed the Gw5blxfy2ukqgizynv5tybeaa67xgzkmj branch from 56b7eaf to 9d19a2d Compare October 15, 2026 04:53
@joshlf
joshlf force-pushed the Gw5blxfy2ukqgizynv5tybeaa67xgzkmj branch from 9d19a2d to d52524f Compare October 15, 2026 14:22
@joshlf
joshlf force-pushed the Gi4f4vhkj7z3stqqcu5unrzfoqwqp3tuc branch from 791f048 to c6fd600 Compare October 15, 2026 14:22
Declare Unaligned's alignment-one promise in its Rust documentation. Prove
the extracted built-in u8 implementation and exercise generic callers,
callee-proof reuse, a concrete caller, and an unused bound whose law must
remain in the theorem domain. Use that law to prove a zero-free unsafe
NonZeroUsize construction followed by ordinary division. The guarded
standard-library interpretation rejects zero as forbidden execution,
even when a caller discards the result or subsequently diverges.
The concrete byte caller discharges the selected implementation's
law.

Interpret the byte carrier's ABI alignment explicitly as one, checked by
the native compile-time layout fixture. Other carriers retain the abstract
alignment data input. The compiled audit checks that complete interpretation,
so the byte theorem cannot silently constrain every generic alignment.

Agent-authored-by: AI agent acting on joshlf's behalf
gherrit-pr-id: Gw5blxfy2ukqgizynv5tybeaa67xgzkmj

This branch has not been deployed

No deployments
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