Skip to content

Commit 4e12fda

Browse files
committed
undef, poison and traps
1 parent c65b87b commit 4e12fda

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

active_discussion/validity.md

+11
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ being either 0, 1 or uninitialized.
3838
but I think we can mostly ignore the extra complications introduced by pointer
3939
values.
4040

41+
In terms of comparing with C, the "uninitialized" bit corresponds to what C
42+
calls "indeterminate" data. In particular, it is allowed to be a "trap
43+
representation". Also, observing the same indeterminate data multiple times is
44+
allowed to yield different results. That's why I am proposing we treat it as a
45+
third state a bit can be in.
46+
47+
In terms of LLVM, the "uninitialized" bit corresponds to `poison`. It is *not*
48+
the same as `undef`! See
49+
[this paper](https://www.cs.utah.edu/~regehr/papers/undef-pldi17.pdf) for some
50+
more material on the topic.
51+
4152
### Extent of "always"
4253

4354
One point we will have to figure out is what exactly "always" means. Thinking

0 commit comments

Comments
 (0)