Skip to content

Instantly share code, notes, and snippets.

@matu3ba
Last active October 17, 2023 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matu3ba/aa1fb6afdb8976490191782f5c388666 to your computer and use it in GitHub Desktop.
Save matu3ba/aa1fb6afdb8976490191782f5c388666 to your computer and use it in GitHub Desktop.
LLVM planned pointer semantics questions
Dear llvm folks, I have some questions on the status or plan for the LLVM memory model semantics regarding pointers and it would be nice, if you can give me pointers where to look for answers.
Context: "PNVI-ae-udi tracks (1) ambiguities in provenance and (2) provenance exposure whereas VIP
does not. On the other hand, (3) VIP tracks provenance in integers (in a limited way, for round-trip
casts) whereas PNVI-ae-udi does not, and (4) VIP relies on the copy_alloc_id primitive, which is
not available in PNVI-ae-udi.". https://iris-project.org/pdfs/2022-popl-vip.pdf
1. As far as understand, temporal (undereferenced) out of bounds pointers are also not forced to be UB in contrast to C. Is that correct and would the llvm model them to allow this use case?
2. From what I understand, the one past the end ambiguous provenance of pointers originates from pointer that were casted to integers losing their provenance. Is there some decision or discussion what llvm is doing or will do and/or if user annotation is planned?
3. Where can I find more general information on the state of things regarding semantics or pointer semantics? Can the Alive project be considered the quasi-official reference for LLVM IR semantics?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment