News for hackers. Stuff that matters.
Re:Ruby2ßhell: Pre-authentication RCE on stock Rails by millerm on Thursday November 19, 2026 @09:40AM (#50560728)
The JVM is written in an unsafe language. That's where these unsafe calls occur. Clients of these APIs have no control there. Java code itself is safe.
Re:Ruby2ßhell: Pre-authentication RCE on stock Rails by pron on Thursday November 19, 2026 @10:57AM (#50561774)
> That's where these unsafe calls occur.

No, it's not. A relatively common case for unsafe in Rust is in data structures. The data structures in the Java runtime are all written in Java and has almost no use of unsafe (there might be a few, but not becsause of language limitation, but because of initialisation order).

As for the JVM, much of it is a compiler. It doesn't matter what language it's written in, as it generates machine code. Indeed, the vulnerability disclosed yesterday was in a compiler intrinsic, but those are just as common in Rust.

Other than that, the other big piece in the JVM is memory management, and it does, indeed, use C and C++ for memory management, but Rust also uses C (the various implementations of malloc/free in whatever runtime the Rust program is using; BTW, some popular malloc/free implementations are almost as big as Java's most complicated GC).

Re:Ruby2ßhell: Pre-authentication RCE on stock Rails by afdbcreid on Thursday November 19, 2026 @03:52PM (#50566203)
Not accurate. Most datastructures that use unsafe in Rust are primitives; `Box`, `Vec`, `Rc`/`Arc`, `HashMap` and `BTreeMap`. Of those, only the equivalent to `HashMap` and `BTreeMap` are written in Java, and they can be written in safe Rust as well if you're willing to give up some of the performance (e.g. always initializing - thing that happens in Java as well). More complex data structures (e.g. graphs) can and often are implemented without unsafe at all.
Re:Ruby2ßhell: Pre-authentication RCE on stock Rails by pron on Thursday November 19, 2026 @04:33PM (#50566723)
I know that you can write slow data structures in safe Rust, but the standard library's data structures are supposed to be efficient. Anyway, a quick look at how common unsafe is in Rust vs Java, both in the standard library and in applications, and you'll see that it's much more common in Rust.
Re:Ruby2ßhell: Pre-authentication RCE on stock Rails by afdbcreid on Thursday November 19, 2026 @03:56PM (#50566251)
> BTW, some popular malloc/free implementations are almost as big as Java's most complicated GC

I'm pretty sure that's incorrect by a wide margin, and that all non-nop GCs java has are as large as at least some popular allocators.

Re:Ruby2ßhell: Pre-authentication RCE on stock Rails by pron on Thursday November 19, 2026 @04:31PM (#50566699)
Then you're in for a surprise. Take a look at TCMalloc and jemalloc. They're almost the size of HotSpot's most complex GC, then non-pause ZGC.
Re:Ruby2ßhell: Pre-authentication RCE on stock Rails by pjmlp on Friday November 20, 2026 @02:09AM (#50571155)
Not all JVM implementations, there are multi-circular implementations in Java, starting with JikesRVM almost 20 years ago already, whose work with the MMtk memory allocator was later inspired a Rust version thereof.