RFR: 8225035: Thread stack size issue caused by large TLS size

Florian Weimer fweimer at redhat.com
Wed Jun 19 14:30:40 UTC 2019


* Jiangli Zhou:

> Would it be do-able to implement cpu-specific code within the JVM to
> handle those cases when needed (?).

Not really.  It depends on the kernel as well, and how the kernel sets
up things.

There could be other reasons why the small stack assumption no longer
holds.  The stack may no longer fit if a library function (used via JNI
or internally in the JVM) increases an on-stack buffer from 1024 to 4096
bytes, perhaps to avoid a buffer truncation/buffer overflow scenario.
If that happens, setting a minimum stack size, irrespective of what the
application requested, is the only way out right now.

Thanks,
Florian


More information about the hotspot-runtime-dev mailing list