harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Deakin <oliver.dea...@googlemail.com>
Subject [classlib][awt] Bug in WinGraphicsEnvironment.cpp
Date Thu, 11 Sep 2008 14:29:33 GMT
Hi all,

Im just going through the last of the errors in HARMONY-5976 and there 
is a bug in WinGraphicsEnvironment.cpp in the 
Java_org_apache_harmony_awt_gl_windows_WinGraphicsConfiguration_createColorModel() 
function.

We create the variable "mask" on line 111. If the if-statement on line 
126 evaluates false, we enter the else block where mask is still not 
initialised. In the cases where the number of bits is 16 or 32, we set 
pfType to be PF_16RGB55 or PF_32RGB888. When we then enter the switch 
block on line 175, we try to then use the uninitialised mask variable in 
calls to NewObject(), which is clearly wrong.

It seems a fix for this would be to move the line initialising mask 
(currently line 127) to before the if-statement it is currently inside. 
I wanted to check if anyone has any opinions/objections on this? If 
there are no objections, I will commit the change.

Regards,
Oliver

-- 
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Mime
View raw message