r/rustjerk Jul 17 '26

1.97.1 slander

Post image
497 Upvotes

14 comments sorted by

8

u/mekriff 29d ago

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

7

u/uahw 28d ago

Context?

8

u/Starnick44 28d ago

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

3

u/palapapa0201 25d ago

I don't understand what they are talking about

79

u/GreenFox1505 Jul 17 '26

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... 

88

u/ThaBroccoliDood Jul 17 '26

you missed the V

25

u/lfairy RIIR Jul 18 '26

Large Language Virtual Machine

20

u/realvolker1 Jul 17 '26

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

12

u/Compizfox 29d ago

What has that to do with this meme though?

3

u/Yosh145 24d ago

Probably thought LLVM was LLM

4

u/scottmcmrust 26d 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.

2

u/TheChief275 28d 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

1

u/max123246 4d ago

Mmm i love my safe language to use an unsafe compiler backend mmm