[vmkit-commits] [PATCH] Various patches
Will Dietz
willdtz at gmail.com
Tue Oct 18 11:13:48 PDT 2011
On Tue, Oct 18, 2011 at 12:36 PM, Nicolas Geoffray
<nicolas.geoffray at gmail.com> wrote:
> Patches 6 and 7 look good. Isn't the +1 in GetStringUTFLength due to the
> trailing '\0'?
>
Possibly?
The "+1" makes sense in the GetStringUTFRegion--the UTF representation
includes the null-terminator and so belongs in the memcpy.
However, looking at documentation for GetStringUTFLength (
http://download.oracle.com/javase/1.4.2/docs/guide/jni/spec/functions.html
), it would appear the "+1" is wrong--and this is confirmed by things
like this: http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=2ef4e1c143c0bf79fc99ee3084f47?bug_id=4027516
.
That said, IIRC "things" broke that motivated me adding it and
flagging it for review since that seemed wrong. Unfortunately I don't
remember *what* broke, so I suppose we should just remove it and see
if anything breaks down the line?
(It's quite possible the +1 masked some random implementation bug I
fixed later, things were rather rough for quite some time, heh)
Later today I can verify that OpenJDK at least bootstraps without the +1...
~Will
More information about the vmkit-commits
mailing list