RFR: JDK-8051990 - Uninitialised memory in jdk/src/share/native/java/lang/fdlibm/src/k_standard.c

Mark Sheppard mark.sheppard at oracle.com
Wed Feb 18 14:05:23 UTC 2015


Hi Alan,

as I understand it,
it is a case that the switch statement doesn't have an explicit default 
case, and as such it is seen that there is the potential
for exc to return garbage as it is a local (stack) variable.
code exc.return is not explicitly initialized in that scenario

I have followed the comments 8011989 and set this to wnf

but the fix below seemed the correct thing to do  ... it is a coding 
style idiom
as to whether switch statements should have an explicit default case.

regards
Mark

On 18/02/2015 13:47, Alan Bateman wrote:
> On 18/02/2015 13:29, Mark Sheppard wrote:
>> Hi
>>    please review the small change
>> http://cr.openjdk.java.net/~msheppar/8051990/webrev/
>>
>> to address the parfait issue in
>> https://bugs.openjdk.java.net/browse/JDK-8051990
>>
> Is this a false positive or is there really something calling 
> __kernel_standard with an invalid type? If there is then setting errno 
> would be good.
>
> The other thing that I wonder about is modifying fdlibm in OpenJDK, 
> should fixes be sent upstream? I remember at one point there was a 
> proposal to replace fdlibm with pure java code but I don't think this 
> has bubbled up to the top of anyone's list yet.
>
> -Alan.




More information about the core-libs-dev mailing list