comparison test/runtime/6929067/Test6929067.sh @ 1320:3b3d12e645e7

6929067: Stack guard pages should be removed when thread is detached Summary: Add code to unmap stack guard area when thread is detached. Reviewed-by: coleenp, kamg
author coleenp
date Fri, 12 Mar 2010 10:42:16 -0500
parents
children f08d439fab8c
comparison
equal deleted inserted replaced
1292:12d91eb0f579 1320:3b3d12e645e7
1 #!/bin/sh
2
3 ##
4 ## @test Test6929067.sh
5 ## @bug 6929067
6 ## @summary Stack guard pages should be removed when thread is detached
7 ## @run shell Test6929067.sh
8 ##
9
10 if [ "${TESTSRC}" = "" ]
11 then TESTSRC=.
12 fi
13
14 if [ "${TESTJAVA}" = "" ]
15 then
16 PARENT=`dirname \`which java\``
17 TESTJAVA=`dirname ${PARENT}`
18 echo "TESTJAVA not set, selecting " ${TESTJAVA}
19 echo "If this is incorrect, try setting the variable manually."
20 fi
21
22 BIT_FLAG=""
23
24 # set platform-dependent variables
25 OS=`uname -s`
26 case "$OS" in
27 Linux)
28 NULL=/dev/null
29 PS=":"
30 FS="/"
31 ;;
32 SunOS | Windows_* )
33 NULL=NUL
34 PS=";"
35 FS="\\"
36 echo "Test passed; only valid for Linux"
37 exit 0;
38 ;;
39 * )
40 echo "Unrecognized system!"
41 exit 1;
42 ;;
43 esac
44
45 LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/i386/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH
46 export LD_LIBRARY_PATH
47
48 THIS_DIR=`pwd`
49
50 cp ${TESTSRC}${FS}invoke.c ${THIS_DIR}
51 cp ${TESTSRC}${FS}T.java ${THIS_DIR}
52
53
54 ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -fullversion
55
56 ${TESTJAVA}${FS}bin${FS}javac T.java
57
58 gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/i386/client/libjvm.so
59 ./invoke
60 exit $?