Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMiri: rename "undef" -> "uninit" #71193
Comments
|
@rustbot claim |
|
This will be quite a large change, especially if tests needs to be updated too. And what about the stuff in |
|
I don't think any tests need to be updated, as there should be no user-visible change. And we're not renaming LLVM, just our own Miri types and fields! If you are grepping for this, only grep in |
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> UninitMask Resolves rust-lang#71193
|
This test will fail
|
|
@hbina thanks a lot for working on this! |
|
Another type we will want to rename in a second batch is |
|
@hbina just a small note: before working on an issue, please check if someone else has claimed it (if it is assigned to rustbot) :) |
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
Renamed "undef" -> "uninit" 1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue rust-lang#71193
|
All right, the first round of renames landed. :) Thanks @hbina! For the second round, here are some more names in
|
yea,
this makes me wonder whether it should be
|
I guess it depends on the caller which naming is more apt. But I feel like an "all" statement is intuitively clearer than an "any" statement. |
For historic reasons, Miri calls uninitialized memory and the value that you get when reading it "undef(ined)". This is potentially derived from LLVM
undef. However, that is actually a misnomer -- Miri's "undef" is much more like LLVM'spoison. Also, the docs and user-visible message usually speak about "uninitialized memory/values", and I think that terminology makes much more sense.We should thus rename all "undef" in Miri to "uninit". In particular, but not limited to:
InvalidUndefBytesScalarMaybeUndefUndefMaskCc @oli-obk