core/heap.c
/* only checks initstack and current dcontext 
 * does not check any dstacks on the callback stack (win32) */
only checks initstack and current dcontext
does not check any dstacks on the callback stack (win32)
only checks initstack and current dcontext does not check any dstacks on the callback stack ( win32 )
bool
is_stack_overflow(dcontext_t *dcontext, byte *sp)
{
    byte *bottom = dcontext->dstack - DYNAMORIO_STACK_SIZE;
    if (sp >= bottom && sp < bottom + (STACK_GUARD_PAGES * PAGE_SIZE))
        return true;
    bottom = initstack - DYNAMORIO_STACK_SIZE;
    if (sp >= bottom && sp < bottom + (STACK_GUARD_PAGES * PAGE_SIZE))
        return true;
    return false;
}
bool is_stack_overflow ( dcontext_t * dcontext , byte * sp ) { byte * bottom = dcontext -> dstack - DYNAMORIO_STACK_SIZE ; if ( sp >= bottom && sp < bottom + ( STACK_GUARD_PAGES * PAGE_SIZE ) ) return true ; bottom = initstack - DYNAMORIO_STACK_SIZE ; if ( sp >= bottom && sp < bottom + ( STACK_GUARD_PAGES * PAGE_SIZE ) ) return true ; return false ; }
only checks initstack and current dcontext
 does not check any dstacks on the callback stack (win32)
only checks initstack and current dcontext does not check any dstacks on the callback stack ( win32 )
/* ASSUMPTION: size of stack is DYNAMORIO_STACK_SIZE = dynamo_options.stack_size
     * currently sideline violates that for a thread stack
     * but all dstacks and initstack should be this size
     */ /* see if in bottom guard page of dstack */ /* now check the initstack */