~/talk

Safely Shoot Yourself in the Foot with Java 9

Talkat JavaDay Ukraine 2017 · 2017-11-04..11-05· [java]
slides:none on file

Java 9 replaces many Unsafe uses with VarHandle vs Unsafe for faster, checked access but Unsafe remains reachable; MethodHandles.privateLookupIn lets code deep-reflect and read or copy private byte[] string contents (final fields still resist direct reassignment). Memory-mapped files still require unmapping and calling the manual Cleaner unmap trick can produce segmentation faults. Other specifics: Striped64/LongAdder and ThreadLocalRandom probe fields change contention behavior, JShell scripting and module flags like --add-opens/--patch-module enable hacks, and CMS removal pushes users toward G1.

AI-written summary · about

  1. 0:00Introduction and welcome
  2. 1:13Java 9 security improvements
  3. 3:41Unsafe and its dangers
  4. 7:37Variable handles in Java 9
  5. 11:10LongAdder and contended fields
  6. 14:23ThreadLocalRandom and hacks
  7. 17:18Deep reflection with VarHandles
  8. 23:13Bypassing module restrictions
  9. 26:52JShell for scripting
  10. 30:04Memory-mapped files in Java
  11. 37:20Java Flight Recorder changes
  12. 38:22Modifying JDK internals
  13. 41:13Parallel streams pitfalls
  14. 42:41BigInteger private method hack
  15. 45:43Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.