RFR - JDK-8133416: [TESTBUG] Remove @ignore for closed/runtime/4345157/Prog.java

Daniel D. Daugherty daniel.daugherty at oracle.com
Fri Nov 6 19:07:40 UTC 2015


On 11/4/15 3:33 AM, Stas Smirnov wrote:
> Hello,
>
> please review this fix for JDK-8133416.
>
> The test has been fixed and rewritten in Java to start using native 
> support mechanism in Jtreg.
> Also, its native part has been modified to avoid compilation on 
> inappropriate platforms and also includes improvements.
> Unfortunately the JBS issue is not visible to the community as well as 
> the original version of the test sources.
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8133416
> webrev: http://cr.openjdk.java.net/~stsmirno/8133416/webrev.00

make/test/JtregNative.gmk
     No comments.

test/runtime/ThreadSignalMask/Prog.java
     No comments.

test/runtime/ThreadSignalMask/ThreadSignalMask.java
     No comments.

test/runtime/ThreadSignalMask/exeThreadSignalMask.c
     General: I think the indent standard for 'C' was also two spaces,
         but I could be wrong...

     L39 char path[PATH_MAX];
         Recommend '+1' for NULL termination space.

     L45: extern void exit(int);
         Hard to believe this isn't in a header file...

     L50: fputs("Error occurred while closing handle", stderr);
         Will this output include a newline?

     L62:     char lib[PATH_MAX];
         Recommend '+1' for NULL termination space.

     L63: snprintf(lib, sizeof (lib), "%s/lib/sparcv9/server/libjvm.so", 
path);
         I don't think snprintf() will NULL terminate if the buffer is full.
         Add: lib[PATH_MAX] = '\0';

     L180:     strncpy(path, argv[1], PATH_MAX);
         strncpy() won't NULL terminate if buffer is full.
         Add: path[PATH_MAX] = '\0';

I think that's it...

Dan

> Tested: the fix has been tested on all platforms with the 
> hotspot/test/runtime testset



More information about the hotspot-runtime-dev mailing list