RFR: 8257885: [TESTBUG] java/foreign/TestSegments.java fails on x86_32

Aleksey Shipilev shade at openjdk.java.net
Tue Dec 8 09:10:11 UTC 2020


On Tue, 8 Dec 2020 08:59:25 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> java/foreign/TestSegments.java fails on x86_32 due to '-Xmx4G'.
> The reason is that -Xmx4G is invalid maximum heap size for 32-bit platforms.
> The current implimentation only supports maximum 3800M on 32-bit systems [1].
> 
> The fix just change '-Xmx4G' to '-Xmx3500M'.
> 
> Testing:
>   - java/foreign/TestSegments.java on Linux/x86_{32,64}  
> 
> Thanks.
> Best regards,
> Jie
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/os/posix/os_posix.cpp#L567

`-Xm3800M` could still fail on many 32-bit systems, for example where native libraries are located in the middle of address space. I think it is safer to `@require` it. In fact, I did it an hour ago here #1688 :)

-------------

PR: https://git.openjdk.java.net/jdk/pull/1689


More information about the core-libs-dev mailing list