These functions cast oops to arrayOop without first checking that the `obj` 
argument is an array. It turns out that TestIntrinsics.java sends in non-array 
objects.

I found this when I worked on something else and changed 
`obj->is_null_free_array()` to `obj->klass()->is_null_free_array_klass()`, and 
the latter asserted because `obj` was a String and not an array.

-------------

Commit messages:
 - 8380902: [lworld] Type confusion in jvm.cpp functions

Changes: https://git.openjdk.org/valhalla/pull/2261/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2261&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8380902
  Stats: 42 lines in 1 file changed: 31 ins; 0 del; 11 mod
  Patch: https://git.openjdk.org/valhalla/pull/2261.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2261/head:pull/2261

PR: https://git.openjdk.org/valhalla/pull/2261

Reply via email to