https://bugs.documentfoundation.org/show_bug.cgi?id=99272

--- Comment #12 from Caolán McNamara <[email protected]> ---
I can reproduce this on F24 with . ./instdir/program/ooenv beforehand.

Debugging into GetShortArrayRegion from libjvm in openjdk I can see that this
ends up in openjdk/hotspot/src/share/vm/prims/jni.cpp in a
DEFINE_GETSCALARARRAYREGION macro which has...

    if (len > 0) { \
      int sc = TypeArrayKlass::cast(src->klass())->log2_element_size(); \
      memcpy((u_char*) buf, \
             (u_char*) src->Tag##_at_addr(start), \
             len << sc);                          \
    } \

and I can plainly see that log2_element_size for the GetShortArrayRegion case
is *2* so we memcpy (len << 2) bytes into the short* output rather than (len <<
1) bytes. Where the log2_element_size comes from originally is opaque to me.
Its extracted from _layout_helper in the klass, that is 0x80100c02, as the last
two bytes. Sort of looks like a bug in openjdk, unless we somehow generate a
bad original jshortArray ourselves somewhere.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to