How are stacks of non-JavaThreads guarded?

David Holmes david.holmes at oracle.com
Tue Dec 1 05:30:29 UTC 2015


On 30/11/2015 11:09 PM, Thomas Stüfe wrote:
> Hi David,
>
> On Mon, Nov 30, 2015 at 12:54 PM, David Holmes <david.holmes at oracle.com
> <mailto:david.holmes at oracle.com>> wrote:
>
>     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
>         <mailto: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.
>
>
> On AIX I disable the OS guard pages. That was the reason for my original
> question. I guess I have
> to revert this and analyze the original problem I tried to solve back
> when I disabled the guard pages.

Sorry missed that. Yes we still want the OS guard pages in general.

David

> Kind Regards, Thomas
>
>     The Java thread guard pages are for recovery purposes.
>
>     David
>     -----
>
>         Regards, Thomas
>
>
>
>             Andrew.
>
>
>


More information about the hotspot-runtime-dev mailing list