JDK-8081295: Build failed with GCC 5.1.1

Yasumasa Suenaga yasuenag at gmail.com
Thu May 28 14:48:33 UTC 2015


Hi Peter,
I CC'ed this email to 2d-dev and Alexander.

> I can pull my fix back in favor of yours which covers other issues too,
> if you want.

I think libsplashscreen should be fixed on JDK-8080695.
I posted new webrev about JDK-8081295 which exclude libsplashscreen [1].

And Alexxander suggested fix about JDK-8080695 [2].
I prefer to fix as so.


Thanks,

Yasumasa


[1] http://mail.openjdk.java.net/pipermail/2d-dev/2015-May/005453.html
[2] http://mail.openjdk.java.net/pipermail/2d-dev/2015-May/005448.html

On 2015/05/28 23:01, Peter Levart wrote:
> 
> 
> On 05/28/2015 03:51 PM, Peter Levart wrote:
>>
>> On 05/28/2015 05:21 AM, Yasumasa Suenaga wrote:
>>> Hi David,
>>>
>>> I posted email to 2d-dev and serviceability-dev.
>>> If my patch is reviewed, I will push it to jdk9/client .
>>>
>>>
>>> Thanks,
>>>
>>> Yasumasa
>> Hi Yasumasa,
>>
>> I think you have the same problem as I and I already filed an issue for it:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8080695
>>
>> The fix has already been approved. I'll push it shortly to jdk9/client.
> 
> Well, my fix is only for the issue in JDK-8080695. I simply marked the
> locals as volatile. Do you know for sure that the variables can't be
> clobbered by longjump if you just disable the warning?
> 
> I can pull my fix back in favor of yours which covers other issues too,
> if you want.
> 
> Regards, Peter
> 
>>
>> Regards, Peter
>>
>>> On 2015/05/27 21:57, David Holmes wrote:
>>>> Hi Yasumasa,
>>>>
>>>> As Erik wrote in the CR each part of this needs to be reviewed by the
>>>> appropriate component team - this seems to be mostly client-libs with a
>>>> dash of serviceability.
>>>>
>>>> Also note that only hotspot pushes need a sponsor as they have to go in
>>>> via our JPRT build/test system. In other areas any JDK9 committer can
>>>> push reviewed changes directly (with assumed sufficient build/test
>>>> coverage).
>>>>
>>>> David
>>>>
>>>> On 27/05/2015 7:37 PM, Yasumasa Suenaga wrote:
>>>>> Hi all,
>>>>>
>>>>> I don't know where should I post this issue - so I post jdk9-dev.
>>>>>
>>>>> I tried to build jdk9/dev on Fedora22 with GCC 5.1.1, however, it was failed.
>>>>> I found several problems:
>>>>>
>>>>>
>>>>>     System:
>>>>>      Fedora release 22 (Twenty Two) x86_64
>>>>>       - gcc-5.1.1-1.fc22.x86_64
>>>>>
>>>>>
>>>>>     Problems:
>>>>>       1. Array bounds check in GCC
>>>>>         - jdk/src/java.desktop/share/native/libjavajpeg/jcmaster.c
>>>>>         - jdk/src/java.desktop/share/native/libjavajpeg/jquant1.c
>>>>>         - jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_64.c
>>>>>         - jdk/src/java.desktop/share/native/libmlib_image/mlib_c_ImageLookUp_f.c
>>>>>
>>>>>         It seems to be bug of GCC:
>>>>>           Bug 59124: [4.8/4.9/5/6 Regression] Wrong warnings "array subscript is above array bounds"
>>>>>           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124
>>>>>
>>>>>         I think implementations of these files have no problem.
>>>>>         So I propose to ignore warning(s) of compiler through pragma option as
>>>>>         workaround when we use GCC [1].
>>>>>
>>>>>
>>>>>       2. Local variables might be clobbered
>>>>>         - jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c
>>>>>
>>>>>         SplashDecodePng() calls setjmp(3).
>>>>>         Some local variables initialize before setjmp() call, and use after it.
>>>>>         Their initial values are only used at cleanup code (*done* label) and
>>>>>         actual values are stored only after setjmp() call.
>>>>>         So I think we can ignore this error through pragma option [1].
>>>>>
>>>>>         However, cleanup code (*done* label) might be occurred runtime error in
>>>>>         libc when some pointers are NULL. So I add NULL check in it.
>>>>>
>>>>>
>>>>>       3. Incorrect condition
>>>>>         - jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c
>>>>>
>>>>>         searchAllSourceNames() returns int value. However, branch condition in
>>>>>         eventFilterRestricted_passesFilter() treats it as boolean value.
>>>>>
>>>>>
>>>>> I've created patch for this enhancement.
>>>>> Could you review it?
>>>>>
>>>>> http://cr.openjdk.java.net/~ysuenaga/JDK-8081295/webrev.00/
>>>>>
>>>>>
>>>>> I'm jdk9 committer, but I'm not employee at Oracle.
>>>>> So I need a Sponsor.
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Yasumasa
>>>>>
>>>>>
>>>>> [1] https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
>>>>>
> 


More information about the jdk9-dev mailing list