On Tue, 31 Mar 2026 06:23:59 GMT, Stefan Karlsson <[email protected]> wrote:
>> 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. >> >> Edit: I've now reworked the patch so that the Java APIs now only accept >> Object[] arrays and then put in asserts in the code that check that this is >> the case. I've also removed the parts of the tests that passes in Strings >> and int arrays. > > Stefan Karlsson has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains four additional > commits since the last revision: > > - Merge remote-tracking branch 'valhalla/lworld' into > 8380902_lworld_type_confusion_in_jvm_cpp > - Merge remote-tracking branch 'valhalla/lworld' into > 8380902_lworld_type_confusion_in_jvm_cpp > - Change the functions to take an Object[] as the argument > - 8380902: [lworld] Type confusion in jvm.cpp functions Okay lets nuke those markword functions. LGTM. ------------- Marked as reviewed by dholmes (Committer). PR Review: https://git.openjdk.org/valhalla/pull/2261#pullrequestreview-4047735723
