# HG changeset patch # User cjplummer # Date 1489790474 25200 # Node ID 292be53258b7ffab7eb845afc9bb05ce3f73c7c0 # Parent 9c029ec7c296d3680b63506c1ba0e4d2ece03639 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 diff -r 9c029ec7c296 -r 292be53258b7 jdk/src/java.base/macosx/native/libjli/java_md_macosx.c --- 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; diff -r 9c029ec7c296 -r 292be53258b7 jdk/src/java.base/unix/native/libjli/java_md_solinux.c --- 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;