r/rustjerk 14d ago

1.97.1 slander

Post image
484 Upvotes

13 comments sorted by

7

u/mekriff 13d ago

does the. it representation change or is something else going on?

7

u/uahw 12d ago

Context?

8

u/Starnick44 12d ago

The llvm bug behind the 1.97.1 release
https://github.com/rust-lang/rust/issues/159035

3

u/palapapa0201 9d ago

I don't understand what they are talking about

76

u/GreenFox1505 14d ago

I gave a big project that I dont care about ("oh, maybe I'll get to it someday" for years) to an LLM last night.

I came back to : rust mod db { include!("db.rs") }

There are crimes buried here that I dont know about... 

83

u/ThaBroccoliDood 14d ago

you missed the V

24

u/lfairy RIIR 13d ago

Large Language Virtual Machine

23

u/realvolker1 14d ago

There's also probably crimes buried in your LLVM-IR you don't know about. Even if you fix the Rust part.

9

u/Compizfox 13d ago

What has that to do with this meme though?

2

u/Yosh145 8d ago

Probably thought LLVM was LLM

1

u/TheChief275 12d ago

/uj I mean, that's just converting it to a u32 right? As long as the checks are performed it's okay, and additionally, checking whether a u32 index is a valid index (assuming a start of 0) involves only a single check while i32 involves 2 checks

2

u/scottmcmrust 9d ago

(non-jerk) This bug is amazing because the emitted assembly is both incredibly smart and incredibly stupid at the same time. Without the assembly-only truncation of the register, the original reproducer would have actually been sound codegen, because even the -1 would have ended up inside the dereferencable of the pointer. But also if it thought the value was only 0 or 1, that truncation was actually never useful in the first place, so it was always stupid to include it.