News for hackers. Stuff that matters.
Re:Removal of Unsafe in Java 9 – A disaster in the making by alextgordon on Monday July 13, 2015 @12:23PM (#9879098)
Reading this thread as C programmer has me scratching my head.

Of course you have to resort to low-level functionality to achieve performance. That's how computers work. We can't all live in fuzzy wuzzy land.

Surely Unsafe is safer than writing the whole thing in C and using JNI?

Re:Removal of Unsafe in Java 9 – A disaster in the making by Daneel_ on Wednesday July 22, 2015 @09:09PM (#9933381)
I completely agree - I have no problem with leveraging low-level functionality, but there's usually a safe and and unsafe way to approach it - and from what I've read 'unsafe' doesn't take the secure approach.

(separately: why the downvote? I get downvoted for having the opinion that it's worth a tiny bit of performance for improved security?)

Re:Removal of Unsafe in Java 9 – A disaster in the making by trb8 on Monday July 13, 2015 @12:33PM (#9879159)
Yes. Also there are many "safe" operations on "unsafe". Such as memory fences.
Re:Removal of Unsafe in Java 9 – A disaster in the making by vardump on Monday July 13, 2015 @08:51PM (#9882195)
Multithreading is somewhat unsafe in general. And so is ability to do most I/O, you might overwhelm the system.
Re:Removal of Unsafe in Java 9 – A disaster in the making by trb8 on Monday July 13, 2015 @10:59PM (#9882609)
Sure. Unsafe in terms of program correctness. By that measure, new Thread() is unsafe.

But that's not a reasonable definition of "unsafe". This could crash the JVM is a reasonable definition. And fences and ordered instructions cannot.