8022301: [TESTBUG] runtime/jsig/Test8017498.sh incorrectly compiles native code

Added the '-m32' compile option and the '-z noexecstack' link option

Reviewed-by: mseledtsov, zgu
This commit is contained in:
Calvin Cheung 2014-01-09 15:48:00 -08:00
parent 3d84ac9ef1
commit 9d16ac7083

View File

@ -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 @@ echo "TESTSRC=${TESTSRC}"
## 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 @@ case "$OS" in
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 @@ cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${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 \