< prev index next >

test/runtime/StackGuardPages/invoke.c

Print this page
rev 8244 : 8078595: [TESTBUG] Fix runtime/StackGuardPages/testme.sh to deal with 64k pages.


 204   }
 205 
 206   return NULL;
 207 }
 208 
 209 void usage() {
 210   fprintf(stderr, "Usage: invoke test_java_overflow\n");
 211   fprintf(stderr, "       invoke test_native_overflow\n");
 212   exit(7);
 213 }
 214 
 215 
 216 int main (int argc, const char** argv) {
 217   JavaVMInitArgs vm_args;
 218   JavaVMOption options[2];
 219   JNIEnv* env;
 220 
 221   printf("Test started with pid: %ld\n", (long) getpid());
 222 
 223   options[0].optionString = "-Xint";
 224   options[1].optionString = "-Xss320k";
 225 
 226   vm_args.version = JNI_VERSION_1_2;
 227   vm_args.ignoreUnrecognized = JNI_TRUE;
 228   vm_args.options = options;
 229   vm_args.nOptions = 2;
 230 
 231   if (JNI_CreateJavaVM (&_jvm, (void **)&env, &vm_args) < 0 ) {
 232     fprintf(stderr, "Test ERROR. Can't create JavaVM\n");
 233     exit(7);
 234   }
 235 
 236   pthread_t thr;
 237 
 238   if (argc > 1 && strcmp(argv[1], "test_java_overflow") == 0) {
 239     printf("\nTesting JAVA_OVERFLOW\n");
 240 
 241     printf("Testing stack guard page behaviour for other thread\n");
 242     pthread_create (&thr, NULL, run_java_overflow, NULL);
 243     pthread_join (thr, NULL);
 244 




 204   }
 205 
 206   return NULL;
 207 }
 208 
 209 void usage() {
 210   fprintf(stderr, "Usage: invoke test_java_overflow\n");
 211   fprintf(stderr, "       invoke test_native_overflow\n");
 212   exit(7);
 213 }
 214 
 215 
 216 int main (int argc, const char** argv) {
 217   JavaVMInitArgs vm_args;
 218   JavaVMOption options[2];
 219   JNIEnv* env;
 220 
 221   printf("Test started with pid: %ld\n", (long) getpid());
 222 
 223   options[0].optionString = "-Xint";
 224   options[1].optionString = "-Xss328k";
 225 
 226   vm_args.version = JNI_VERSION_1_2;
 227   vm_args.ignoreUnrecognized = JNI_TRUE;
 228   vm_args.options = options;
 229   vm_args.nOptions = 2;
 230 
 231   if (JNI_CreateJavaVM (&_jvm, (void **)&env, &vm_args) < 0 ) {
 232     fprintf(stderr, "Test ERROR. Can't create JavaVM\n");
 233     exit(7);
 234   }
 235 
 236   pthread_t thr;
 237 
 238   if (argc > 1 && strcmp(argv[1], "test_java_overflow") == 0) {
 239     printf("\nTesting JAVA_OVERFLOW\n");
 240 
 241     printf("Testing stack guard page behaviour for other thread\n");
 242     pthread_create (&thr, NULL, run_java_overflow, NULL);
 243     pthread_join (thr, NULL);
 244 


< prev index next >