|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
Gary Benson reported on the OpenJDK hotspot-dev mailing list:
The first thing I discovered is that the current linux code is wrong
when there are guard pages. The comment above current_stack_region
in os_linux_{i486,amd64,x86}.cpp puts the guard page outside the
region reported by pthread_attr_getstack(), which is not the case.
It needs to use pthread_attr_getguardsize() and trim that many bytes
from the bottom of the region reported by pthread_attr_getstack().
For Java threads we don't set any glibc guardpages, but for natively attaching threads we assume that the glibc guardpage is outside the stack area as reported by pthread_attr_getstack and pthread_attr_getstacksize.
However it seems glibc doesn't read the POSIX specification in the same way:
https://bugzilla.redhat.com/show_bug.cgi?id=435337
as a result hotspot's guard pages may overlap the glibc guard pages on attached threads.
|