Hi Alexander,

I filed the issue as:

https://bugs.openjdk.java.net/browse/JDK-8080695

The proposed patch is this, which also fixes compile time error:

http://cr.openjdk.java.net/~plevart/jdk9-dev/splashscreen_png/webrev.02/

If this is OK, I can push it if the change can go via jdk9-dev repository where I can commit. Is there a special repository for client libs? Do I need a sponsor?

Regards, Peter

On 05/19/2015 03:59 PM, Alexander Zvegintsev wrote:
Hi Peter,

I think that your solution can be simplified to:

diff -r 729dffc8afa0 src/java.desktop/share/native/libsplashscreen/splashscreen_png.c
--- a/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c
+++ b/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c
@@ -77,6 +77,8 @@ SplashDecodePng(Splash * splash, png_rw_
 #else
     if (setjmp(png_jmpbuf(png_ptr))) {
 #endif
+        row_pointers = NULL;
+        image_data = NULL;
         goto done;
     }

As another solution you can declare row_pointers and image_data as volatile.

BTW, Could you please file an issue?

Thanks,

Alexander.
On 05/19/2015 01:50 PM, Peter Levart wrote:
Hi,

I hope this is the right thread to post the observation.

Building recent OpenJDK 9 from sources on Fedora 21 fails with this:

/home/peter/work/hg/jdk9-dev/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c: In function 'SplashDecodePng': /home/peter/work/hg/jdk9-dev/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c:51:16: error: variable 'row_pointers' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
     png_bytepp row_pointers = NULL;
                ^
/home/peter/work/hg/jdk9-dev/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c:52:15: error: variable 'image_data' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
     png_bytep image_data = NULL;
               ^
cc1: all warnings being treated as errors
gmake[3]: *** [/home/peter/work/hg/jdk9-dev/build/linux-x86_64-normal-server-release/support/native/java.desktop/libsplashscreen/splashscreen_png.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
Awt2dLibraries.gmk:879: recipe for target '/home/peter/work/hg/jdk9-dev/build/linux-x86_64-normal-server-release/support/native/java.desktop/libsplashscreen/splashscreen_png.o' failed
gmake[2]: *** [java.desktop-libs] Error 1
make/Main.gmk:168: recipe for target 'java.desktop-libs' failed


I found that making the following change eliminates the compiler error:

http://cr.openjdk.java.net/~plevart/jdk9-dev/splashscreen_png/webrev.01/

Is this the right way to fix it?

Regards, Peter



Reply via email to