<AWT Dev> <AWT dev>[9] Review request for 8151333: Some AWT functions may access an array outside of its bounds

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Mar 30 18:47:34 UTC 2016


  - Should the similar check be applied to 
enumDisplayModes()/configDisplayMode()?
  - Should we use awt_numScreens instead of XScreenCount()? seems that 
the XScreenCount is used in non-Xinerama code? but awt_numScreens is 
initialized in both cases?

It is unclear do we really support display modes on non-main screen in 
case of Xinerama, or it is unsupported on unix? Also looks strange that 
we pass to java the screen number which is outside of our internal 
native structure.

On 29.03.16 21:59, Phil Race wrote:
> It looks fine to me. I recommend an 8ux backport for this.
>
> -phil.
>
> On 03/22/2016 06:17 AM, Semyon Sadetsky wrote:
>> Hello,
>>
>> Please review fix for JDK9:
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8151333
>> webrev: http://cr.openjdk.java.net/~ssadetsky/8151333/webrev.00/
>>
>> This just suppose to be a potential issue. It is discovered by
>> AddressSanitizer.
>> When Xinerama is used the number of screens that is seen by WM is
>> always 1. But X11GraphicsDevice#getDisplayMode() may be called with
>> the "real" screen number and this is not checked in the native code
>> and thus may cause incorrect memory addressing.
>> As a solution a check for validity of the screen number is added.
>> Test would require writing native code, so noreg-hard label is added.
>>
>> --Semyon
>


-- 
Best regards, Sergey.


More information about the awt-dev mailing list