RFR: 8197429: Increased stack guard causes segfaults on x86-32

Andrew Haley aph at redhat.com
Sat Feb 10 16:28:36 UTC 2018


On 10/02/18 00:41, Leonid Mesnik wrote:
> 
> Could you please update bug
> https://bugs.openjdk.java.net/browse/JDK-8197429 with affected and
> fixed version of jdk.  It is unclear where you plan to push this
> fix. I assume that you are going to push into jdk/hs repo.

Sure.  The bug affects all versions of HotSpot running on a modern
Linux kernel, going back years.

> (from your webrev: Compare against:http://hg.openjdk.java.net/jdk/hs)
> 
> I looked on the tests only. Here are my comments:
> 
> 1) There are no copyrights for new files.

OK.

> 2) File
> http://cr.openjdk.java.net/~aph/8197429-1/test/hotspot/jtreg/runtime/8197429/foo.java.html
>  <http://cr.openjdk.java.net/~aph/8197429-1/test/hotspot/jtreg/runtime/8197429/foo.java.html>contains the same code as in T.java and doesn’t seems to be used.

OK.

> 
> 3) The preferable name for test is some meaningful and rather then bug-id.
> Would it possible to replace runtime/8197429 with something like runtime/segfaults ?

I guess so, but that doesn't help much.  I'll try something like "stack
guard" as a name.

> 4) Currently the correct way to use native libs is to compile it during build and use with -nativepath. 
> See make examples here:
> http://hg.openjdk.java.net/jdk/jdk10/file/tip/make/test/JtregNativeHotspot.gmk
>  <http://hg.openjdk.java.net/jdk/jdk10/file/tip/make/test/JtregNativeHotspot.gmk>http://hg.openjdk.java.net/jdk/jdk10/file/tip/test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters <http://hg.openjdk.java.net/jdk/jdk10/file/tip/test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters>
> So you might rewrite your test completely on java. So you could use requires tag to filter out unsupported platforms.
> Also logic of choosing platform will be slightly different. 

I'll do that.  I wasn't at all sure whether only to test x86 for this
bug: sure, only x86 is affected now, but it does not hurt to test JNI
invocation with non-standard stack sizes on all platforms.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-dev mailing list