RFR 8144278 [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support

Dmitry Samersoff dmitry.samersoff at oracle.com
Thu Jun 2 15:54:13 UTC 2016


Gerald,

exeinvoke.c

127:
  I think we should compile entire test (and probably all other tests)
with disabled optimization (e.g. -g -O0) to simplify debugging if the
test crash.


239:
   Please declare a static variable:

    static char javaclassopt[4096];

  then use

   snprintf(javaclassopt, sizeof(javaclassopt),
       "-Djava.class.path=%s", javaclasspath);

  and check it's return value.


295: Please change usage() to return value 7 rather than call exit and
     change this line to

      return usage();

     to avoid unreachable statements.

-Dmitry

On 2016-06-02 18:28, Gerald Thornbrugh wrote:
> Hi Everyone,
> 
> Please review my changes to address JDK-8144278.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8144278
> 
> JDK Webrev: http://cr.openjdk.java.net/~gthornbr/8144278/jdk-webrev.00/
> <http://cr.openjdk.java.net/%7Egthornbr/8144278/jdk-webrev.00/>
> 
> Hotspot Webrev:
> http://cr.openjdk.java.net/~gthornbr/8144278/hotspot-webrev.00/
> <http://cr.openjdk.java.net/%7Egthornbr/8144278/hotspot-webrev.00/>
> 
> 
> The fix makes changes to two areas.
> 
> The JDK changes where needed to add a path to the libjvm.so library when
> linking test executables.
> These changes where provide by Erik Joelsson.
> 
> The Hotspot changes addressed the following issues:
> 
> The StackGuardPages test directory needed to be added to the list of
> native executable tests.
> 
> The libjvm.so and libpthread.so libraries needed to be added to the
> LDFLAGS definition for the
> "invoke" test executable.
> 
> The StackGuardPages/testme.sh script needed to specify that
> DoOverflow.java must be complied,
> specify the new location of the "invoke" test executable and remove all
> portions of the script that
> compiled and linked DoOverflow.java and invoke.c.
> 
> The native test source file "invoke.c" needed to be renamed
> "exeinvoke.c" so the build system will
> automatically build it.
> 
> The native test source file exeinvoke.c needed to be changed to compile
> without warnings, pass the
> path of the DoOverflow.class file to the function which starts the JVM
> and keep the linux gcc compiler
> optimizer from in-lining the do_overflow() function which caused it not
> to get called.
> 
> Please let me know if you have any questions or concerns.
> 
> Thanks,
> 
> Gerald
> 



More information about the hotspot-runtime-dev mailing list