On Fri, 16 Oct 2020 04:49:37 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>>> > > How it is possible to test the current changes? >>> > >>> > >>> > For GraalVM native image, we run JCK tests `api/java_awt` and >>> > `api/javax_swing`. Those tests built as a native image. >>> >>> I meant some "steps to reproduce" the current bug, and which can be used to >>> verify the current fix. >> >> Actually, we have found this issue during JCK tests execution that was built >> as a native image. The fix criteria are >> the successful tests run. > >> Actually, we have found this issue during JCK tests execution that was built >> as a native image. The fix criteria are >> the successful tests run. > > But what exact steps should be done to reproduce this bug w/o using jck or > any external tools? Something like: > - Clone JDK > - Build JDK using some specific options. > - Create some small test case > - Somehow create the native image > - Run the app -> boom -> bug is reproduced Yes, I understand what you mean. Unfortunately, I don't know a straightforward way. Maybe the easiest way to reproduce an error and validate the fix is to download the future version of GraalVM with AWT/Swing support (hope it will be at the end of October), replace `libawt.a` to its unpatched library version and then build a native image based on the following code: float[] data = new float[]{0.0f, 1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.6f, 7.7f, 8.8f}; Kernel kernel = new Kernel(3, 3, data); ConvolveOp op = new ConvolveOp(kernel); BufferedImage src = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); BufferedImage dest = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); op.filter(src, dest); The built image run should throw "Unable to convolve src image" ImagingOpException exception. ------------- PR: https://git.openjdk.java.net/jdk/pull/562