8022301: [TESTBUG] runtime/jsig/Test8017498.sh incorrectly compiles native code
Summary: added the '-m32' compile option and the '-z noexecstack' link option
Reviewed-by: mseledtsov, zgu
--- a/hotspot/test/runtime/jsig/Test8017498.sh Thu Jan 09 14:06:53 2014 -0500
+++ b/hotspot/test/runtime/jsig/Test8017498.sh Thu Jan 09 15:48:00 2014 -0800
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -29,6 +29,7 @@
## @bug 8017498
## @bug 8020791
## @bug 8021296
+## @bug 8022301
## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
## @run shell/timeout=30 Test8017498.sh
##
@@ -42,6 +43,8 @@
## Adding common setup Variables for running shell tests.
. ${TESTSRC}/../../test_env.sh
+EXTRA_CFLAG=
+
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
@@ -57,6 +60,7 @@
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so
else
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so
+ EXTRA_CFLAG=-m32
fi
echo MY_LD_PRELOAD = ${MY_LD_PRELOAD}
;;
@@ -72,6 +76,7 @@
${TESTJAVA}${FS}bin${FS}javac *.java
$gcc_cmd -DLINUX -fPIC -shared \
+ ${EXTRA_CFLAG} -z noexecstack \
-o ${TESTSRC}${FS}libTestJNI.so \
-I${TESTJAVA}${FS}include \
-I${TESTJAVA}${FS}include${FS}linux \