<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Peter,<br>
    <br>
    I think that your solution can be simplified to:<br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <tt><br>
    </tt><tt>diff -r 729dffc8afa0
      src/java.desktop/share/native/libsplashscreen/splashscreen_png.c</tt><tt><br>
    </tt><tt>---
      a/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c</tt><tt><br>
    </tt><tt>+++
      b/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c</tt><tt><br>
    </tt><tt>@@ -77,6 +77,8 @@ SplashDecodePng(Splash * splash, png_rw_</tt><tt><br>
    </tt><tt> #else</tt><tt><br>
    </tt><tt>     if (setjmp(png_jmpbuf(png_ptr))) {</tt><tt><br>
    </tt><tt> #endif</tt><tt><br>
    </tt><tt>+        row_pointers = NULL;</tt><tt><br>
    </tt><tt>+        image_data = NULL;</tt><tt><br>
    </tt><tt>         goto done;</tt><tt><br>
    </tt><tt>     }</tt><br>
     <br>
    As another solution you can declare row_pointers and image_data as
    volatile.<br>
    <br>
    BTW, Could you please file an issue?<br>
    <br>
    <pre class="moz-signature" cols="72">Thanks,

Alexander.</pre>
    <div class="moz-cite-prefix">On 05/19/2015 01:50 PM, Peter Levart
      wrote:<br>
    </div>
    <blockquote cite="mid:555B1574.7000302@gmail.com" type="cite">Hi,
      <br>
      <br>
      I hope this is the right thread to post the observation.
      <br>
      <br>
      Building recent OpenJDK 9 from sources on Fedora 21 fails with
      this:
      <br>
      <br>
      /home/peter/work/hg/jdk9-dev/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c:
      In function 'SplashDecodePng':
      <br>
      /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]
      <br>
           png_bytepp row_pointers = NULL;
      <br>
                      ^
      <br>
      /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]
      <br>
           png_bytep image_data = NULL;
      <br>
                     ^
      <br>
      cc1: all warnings being treated as errors
      <br>
      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
      <br>
      gmake[3]: *** Waiting for unfinished jobs....
      <br>
      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
      <br>
      gmake[2]: *** [java.desktop-libs] Error 1
      <br>
      make/Main.gmk:168: recipe for target 'java.desktop-libs' failed
      <br>
      <br>
      <br>
      I found that making the following change eliminates the compiler
      error:
      <br>
      <br>
<a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~plevart/jdk9-dev/splashscreen_png/webrev.01/">http://cr.openjdk.java.net/~plevart/jdk9-dev/splashscreen_png/webrev.01/</a>
      <br>
      <br>
      Is this the right way to fix it?
      <br>
      <br>
      Regards, Peter
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>