runtimeverification / runtimeverification/mir-semantics

Extend pointer emulation to pass alignment check

Open
#638 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #877 by @jberthold — closed without merging
Dominant language
Python
Stars
52
Forks
5
PR merge metrics
No merged PRs in 30d

Description

(Unsafe) raw pointer dereferencing creates code for a pointer alignment check which currently creates thunks and gets stuck.
The alignment check (as well as the unOpOffset) require simulating an address according to the referenced type, its (original) size and alignment must be respected on offsets and when transmuteing pointers to numbers.

image

Originally posted by @jberthold in https://github.com/runtimeverification/mir-semantics/pull/637#discussion_r2247117483

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the pointer-alignment check and the unOpOffset handling, then trace how transmute converts pointers to numbers. Done means address simulation respects the referenced type's original size and alignment on offsets and transmutations, without creating stuck thunks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.