Closed MikaelUrankar closed 5 years ago
Sorry for the late comment.
I believe this change would break OpenBSD & NetBSD on i386. Perhaps this line should be moved into the the #define block where it can be left at julong for Apple and Open and NetBSD.
My bad for merging it without checking them :(. I don't think I have an i386 VM for either OpenBSD or NetBSD. Let me create one and see if I can verify this.
I have one handy and can test. HW_PHYSMEM64 used on OpenBSD and NetBSD is documented as a 64 bit integer so it's pretty clear this change will be an issue with that sysctl MIB on 32 bit platforms.
Note that a FreeBSD12/i386 fastdebug build also fails, but on a different assert:
# Internal Error (/home/glewis/jdk11/openjdk-jdk11u/src/hotspot/cpu/x86/assembler_x86.cpp:1553), pid=42456, tid=100788
# assert(entry == __null || is_simm32(disp)) failed: disp=0xff719c08 must be 32bit offset (call2)
I confirmed that the sysctl goes through the error path on OpenBSD/i386. Note that ./src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c will also need to be adjusted to match our solution for this. I'll submit a pull request shortly with proposed changes.
Sorry for the breakage :(
I confirmed that the sysctl goes through the error path on OpenBSD/i386. Note that ./src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c will also need to be adjusted to match our solution for this. I'll submit a pull request shortly with proposed changes.
If you work on OperatingSystemImpl.c, can you fix this conditional please?: https://github.com/battleblow/openjdk-jdk11u/blob/bsd-port/src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c#L263
edit: should be #elif defined...
No worries. Thanks for pointing out the typo. Proposed changes in #80
NetBSD must have uint64_t.
it fixes https://github.com/battleblow/openjdk-jdk11u/issues/77