Ben Kimock

Results 249 comments of Ben Kimock

> Can I help with this bug? Maybe. Usually the best thing to do here is to minimize the reproducer. The fact that your reproducer uses the standard library formatting...

> In more complex cases, I'm also not sure that LLVM utilizes `assume` correctly. I'd really like to have an example of this, if you think it's happening. I think...

Are you saying you're trying to write a MIR optimization or something like one so that rustc emits the LLVM IR that's easier for LLVM to optimize well, and `UbCheck`...

This is a MIR optimization, and we already deliberately use `-Zmir-opt-level=0` in Miri to turn off MIR optimizations that may hide UB. This optimizations is just another aspect of that...

> From what I understood, MAP_PRIVATE has some corner cases that make it unsafe I implemented Miri's `mmap` support so I'd like to think I know a fair bit about...

Ah. Whatever that IRC discussion was is not about the Rust concept of unsafety. In Rust, the way we use `memmap2` is UB if the mapping is updated. So if...

UB is short for Undefined Behavior; alternatively "things the compiler will assume implicitly in order to optimize". In this case, `memmap2` hands out a `&[u8]` to the mapping, and a...

LLVM assertion: ``` rustc: /checkout/src/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:300: MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a SimpleValueType!"' failed. ``` ``` #5 0x00007195748dbd46 in __assert_fail ( assertion=0x71956bda6f50 "isSimple() && \"Expected a SimpleValueType!\"", file=0x71956bcd2af1 "/checkout/src/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h",...

Turns out this is the hard part: https://github.com/rust-lang/rust/blob/8401645716b26a8b4c6974dc0680e55e81e9e8a1/compiler/rustc_incremental/src/persist/save.rs#L169-L181 the DepGraph that's encoded here doesn't go through `save_in`, which is truly awful.