RFR: 8255128: linux x86 build failure with libJNIPoint.c
Jorn Vernee
jvernee at openjdk.java.net
Tue Nov 3 17:48:01 UTC 2020
On Tue, 3 Nov 2020 17:42:08 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> test/micro/org/openjdk/bench/jdk/incubator/foreign/points/support/libJNIPoint.c line 32:
>>
>>> 30: #define PTR_TO_JLONG(value) ((jlong) (value))
>>> 31: #else
>>> 32: #define JLONG_TO_PTR(value, type) ((type*) (jint) (value))
>>
>> Maybe the jlong thisPoint argument comes from a pointer so it's ok. Not nice, but if you say so, I'll go along.
>
> Yes, it's the same pointer that is returned from allocate. It's just stored in a `jlong` on the Java side (this would be a requirement on x64), but it's not expected that the high-order bits are used.
>
> Do you have a suggestion for handling this otherwise?
Hmm, now that I think about it, we could add overloads that work with `int` for 32-bit platforms.
But, for now 32-bit usage of these benchmarks seems unlikely. Since the build passes, and the benchmarks run on both platforms already, I'm reluctant to put much more effort into this at the moment.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1017
More information about the build-dev
mailing list