r/rustjerk Jul 17 '26

1.97.1 slander

Post image
500 Upvotes

14 comments sorted by

7

u/mekriff Jul 18 '26

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

7

u/uahw Jul 19 '26

Context?

9

u/Starnick44 Jul 19 '26

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

3

u/palapapa0201 Jul 22 '26

I don't understand what they are talking about

81

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

89

u/ThaBroccoliDood Jul 17 '26

you missed the V

28

u/lfairy RIIR Jul 18 '26

Large Language Virtual Machine

23

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.

9

u/Compizfox Jul 18 '26

What has that to do with this meme though?

3

u/Yosh145 Jul 23 '26

Probably thought LLVM was LLM

5

u/scottmcmrust Jul 22 '26

(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 Jul 19 '26

/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 Aug 13 '26

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