author | fparain |
Wed, 04 Jan 2012 03:49:35 -0800 | |
changeset 11365 | 05d995976571 |
parent 10276 | 075b742ae6ec |
child 12729 | 684b5857e506 |
permissions | -rw-r--r-- |
10275
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
1 |
#!/bin/sh |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
2 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
3 |
## |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
4 |
## @test |
10276 | 5 |
## @bug 7020373 7055247 |
10275
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
6 |
## @key cte_test |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
7 |
## @summary JSR rewriting can overflow memory address size variables |
10276 | 8 |
## @ignore Ignore it until 7053586 fixed |
10275
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
9 |
## @run shell Test7020373.sh |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
10 |
## |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
11 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
12 |
if [ "${TESTSRC}" = "" ] |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
13 |
then TESTSRC=. |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
14 |
fi |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
15 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
16 |
if [ "${TESTJAVA}" = "" ] |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
17 |
then |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
18 |
PARENT=`dirname \`which java\`` |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
19 |
TESTJAVA=`dirname ${PARENT}` |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
20 |
echo "TESTJAVA not set, selecting " ${TESTJAVA} |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
21 |
echo "If this is incorrect, try setting the variable manually." |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
22 |
fi |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
23 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
24 |
if [ "${TESTCLASSES}" = "" ] |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
25 |
then |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
26 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
27 |
exit 1 |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
28 |
fi |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
29 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
30 |
BIT_FLAG="" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
31 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
32 |
# set platform-dependent variables |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
33 |
OS=`uname -s` |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
34 |
case "$OS" in |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
35 |
SunOS | Linux ) |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
36 |
NULL=/dev/null |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
37 |
PS=":" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
38 |
FS="/" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
39 |
## for solaris, linux it's HOME |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
40 |
FILE_LOCATION=$HOME |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
41 |
if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
42 |
then |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
43 |
BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
44 |
fi |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
45 |
;; |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
46 |
Windows_* ) |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
47 |
NULL=NUL |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
48 |
PS=";" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
49 |
FS="\\" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
50 |
;; |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
51 |
* ) |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
52 |
echo "Unrecognized system!" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
53 |
exit 1; |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
54 |
;; |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
55 |
esac |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
56 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
57 |
JEMMYPATH=${CPAPPEND} |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
58 |
CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
59 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
60 |
THIS_DIR=`pwd` |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
61 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
62 |
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
63 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
64 |
${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
65 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
66 |
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass4000_1 > test.out 2>&1 |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
67 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
68 |
cat test.out |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
69 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
70 |
egrep "SIGSEGV|An unexpected error has been detected" test.out |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
71 |
|
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
72 |
if [ $? = 0 ] |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
73 |
then |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
74 |
echo "Test Failed" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
75 |
exit 1 |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
76 |
else |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
77 |
grep "java.lang.LinkageError" test.out |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
78 |
if [ $? = 0 ] |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
79 |
then |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
80 |
echo "Test Passed" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
81 |
exit 0 |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
82 |
else |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
83 |
echo "Test Failed" |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
84 |
exit 1 |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
85 |
fi |
fd163a3b3591
7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff
changeset
|
86 |
fi |