[llvm] [llubi] Add support for exposed provenance (PR #200596)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 13 09:14:35 PDT 2026
================
@@ -104,26 +104,67 @@ enum class StorageKind {
/// Tri-state boolean value.
enum class BooleanKind { False, True, Poison };
+/// A set of previously exposed provenances. It is originally yielded by
+/// inttoptr, and shared by pointers derived from the result.
+///
+/// Each capability check may invalidate some provenances. If we cannot
+/// pick one, it is UB. That is, from the angelic non-determinism view,
+/// we cannot pick a provenance to make the program reach this point.
+///
+/// For efficiency, this class has different forms in two stages:
+/// 1. Before any memory access is performed, ActiveMask is set to zero and
+/// Generation represents the global generation number of the snapshot.
+/// 2. After a memory access is performed, we can determine exactly one memory
+/// object to be accessed (address ranges are distinct). In this case,
+/// BaseAddress is set and ActiveMask is non-zero. ActiveMask represents the
+/// validity of first N exposed provenances associated with the memory object.
----------------
nikic wrote:
```suggestion
/// validity of the first N exposed provenances associated with the memory object.
```
https://github.com/llvm/llvm-project/pull/200596
More information about the llvm-commits
mailing list