News for hackers. Stuff that matters.
Re:Java4Shell: RCE in OpenJDK when processing Base64 by jeffbee on Tuesday November 17, 2026 @05:36PM (#50539268)
If I owned an entire language platform with a JIT, it would not contain assembly in its standard library, it would simply be improved until it generated something at least that fast from high-level source code on that target CPU.

This is something I really like about LLVM. Their libc isn't spilling over with hand-written assembly. It's written in straightforward C++ under the belief that the compiler does, or will do, a good job.

Re:Java4Shell: RCE in OpenJDK when processing Base64 by jamesfinlayson on Wednesday November 18, 2026 @01:27AM (#50542565)
> If I owned an entire language platform with a JIT, it would not contain assembly in its standard library, it would simply be improved until it generated something at least that fast from high-level source code on that target CPU.

Interestingly I remember a guy who worked on the JVM giving a talk and saying (back then at least) that they were working to move as much of the JVM to plain Java as they could.

Re:Java4Shell: RCE in OpenJDK when processing Base64 by nly on Wednesday November 18, 2026 @04:35AM (#50544045)
LLVM is an AOT compiler. The JVM has a runtime budget
Re:Java4Shell: RCE in OpenJDK when processing Base64 by jeffbee on Wednesday November 18, 2026 @10:43AM (#50547692)
Java has chosen to compile this function AOT. They can compile it AOT from source code.
Re:Java4Shell: RCE in OpenJDK when processing Base64 by saagarjha on Wednesday November 18, 2026 @07:13AM (#50545355)
I don’t think you’ve looked at LLVM libc’s string routines if you think it’s “written in straightforward C++ under the belief that the compiler does…a good job”. It’s basically an assembly DSL
Re:Java4Shell: RCE in OpenJDK when processing Base64 by jeffbee on Wednesday November 18, 2026 @09:57AM (#50547070)
I think I know vaguely what you mean. But LLVM still tries to contain the asm to the minimal, innermost performance-sensitive place where it needs to go, if it needs to be there at all, and they use intrinsics whenever possible instead of asm statements. Compare LLVM and GNU strlen. In LLVM, the logic of the function is mostly in readable code, and the way to select the target ISA makes sense. In GNU, it's 100% assembly and the target ISA is involved in scattered preprocessor directives.