changeset 46846:292be53258b7

8175342: assert(InstanceKlass::cast(k)->is_initialized()) failed: need to increase java_thread_min_stack_allowed calculation Summary: Remove the pthreads stack guard page from the thread created in ContinueInNewThread0 Reviewed-by: dholmes, dsamersoff
author cjplummer
date Fri, 17 Mar 2017 15:41:14 -0700
parents 9c029ec7c296
children 3720a014bb74 8b053ca26d6a
files jdk/src/java.base/macosx/native/libjli/java_md_macosx.c jdk/src/java.base/unix/native/libjli/java_md_solinux.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c	Fri Mar 17 08:40:12 2017 -0400
+++ b/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c	Fri Mar 17 15:41:14 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -886,6 +886,7 @@
     if (stack_size > 0) {
       pthread_attr_setstacksize(&attr, stack_size);
     }
+    pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threads
 
     if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
       void * tmp;
--- a/jdk/src/java.base/unix/native/libjli/java_md_solinux.c	Fri Mar 17 08:40:12 2017 -0400
+++ b/jdk/src/java.base/unix/native/libjli/java_md_solinux.c	Fri Mar 17 15:41:14 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, 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
@@ -899,6 +899,7 @@
     if (stack_size > 0) {
       pthread_attr_setstacksize(&attr, stack_size);
     }
+    pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threads
 
     if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
       void * tmp;