How are stacks of non-JavaThreads guarded?

David Holmes david.holmes at oracle.com
Mon Nov 30 11:54:23 UTC 2015


On 30/11/2015 5:01 PM, Thomas Stüfe wrote:
> Hi Andrew,
>
> On Sat, Nov 28, 2015 at 10:57 AM, Andrew Haley <aph at redhat.com> wrote:
>
>> On 28/11/15 07:55, Thomas Stüfe wrote:
>>> So, in JavaThread we establish stack guards (red and yellow zones). But I
>>> do not find anything similar for non JavaThread threads, e.g. VmThread?
>>
>> There isn't, and I don't think it's possible because there is no
>> reasonably portable way to recover from a stack overflow in C++.
>>
>>
> thanks for clarifying.
>
> But I don't even want to recover; a hard-and-fast crash is better than
> running over whatever happens to be below the VmThread stack. Well,
> something to mull over.

You will run into the libc guard pages as I understand it and get your 
hard-and-fast crash.

The Java thread guard pages are for recovery purposes.

David
-----

> Regards, Thomas
>
>
>
>> Andrew.
>>
>>


More information about the hotspot-runtime-dev mailing list