RFR: JDK-8051990 - Uninitialised memory in jdk/src/share/native/java/lang/fdlibm/src/k_standard.c
Alan Bateman
Alan.Bateman at oracle.com
Mon Nov 10 19:39:29 UTC 2014
On 10/11/2014 19:09, Mark Sheppard wrote:
> Hi
>
> please oblige and review the follow minor change
>
> diff -r c0d1026bff6f src/java.base/share/native/libfdlibm/k_standard.c
> --- a/src/java.base/share/native/libfdlibm/k_standard.c Tue Nov 04
> 15:10:38 2014 +0000
> +++ b/src/java.base/share/native/libfdlibm/k_standard.c Mon Nov 10
> 19:02:57 2014 +0000
> @@ -1,6 +1,6 @@
>
> /*
> - * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights
> reserved.
> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> *
> * This code is free software; you can redistribute it and/or modify it
> @@ -106,6 +106,7 @@
> #endif
> exc.arg1 = x;
> exc.arg2 = y;
> + exc.retval = zero;
> switch(type) {
> case 1:
> /* acos(|x|>1) */
I wonder if we should be feeding changes to fdlibm upstream, Joe Darcy
might know.
So is the real issue here that the switch doesn't have a default
statement to catch a possible mis-use of this function? I just wonder if
that might be better than setting retval twice (although it might get
optimized away sometimes).
-Alan
More information about the core-libs-dev
mailing list