[Bug target/10127] -fstack-check let's program crash

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 3 22:50:00 GMT 2009



------- Comment #8 from ebotcazou at gcc dot gnu dot org  2009-11-03 22:49 -------
Subject: Bug 10127

Author: ebotcazou
Date: Tue Nov  3 22:49:37 2009
New Revision: 153877

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153877
Log:
        PR target/10127
        PR ada/20548
        * expr.h (STACK_CHECK_PROBE_INTERVAL): Delete.
        (STACK_CHECK_PROBE_INTERVAL_EXP): New macro.
        (STACK_CHECK_MOVING_SP): Likewise.
        * system.h (STACK_CHECK_PROBE_INTERVAL): Poison it.
        * doc/tm.texi (Stack Checking): Delete STACK_CHECK_PROBE_INTERVAL.
        Document STACK_CHECK_PROBE_INTERVAL_EXP and STACK_CHECK_MOVING_SP.
        * doc/md.texi (Standard Pattern Names): Tweak entry of CHECK_STACK.
        Document PROBE_STACK.
        * explow.c (anti_adjust_stack_and_probe): New function.
        (allocate_dynamic_stack_space): Do not directly allocate space if
        STACK_CHECK_MOVING_SP, instead invoke above function.
        (emit_stack_probe): Handle probe_stack insn.
        (PROBE_INTERVAL): New macro.
        (STACK_GROW_OPTAB): Likewise.
        (STACK_GROW_OFF): Likewise.
        (probe_stack_range): Use Pmode and memory_address consistently.  Fix
        loop condition in the small constant case.  Rewrite in the general
        case to be immune to wraparounds.  Make sure the address of probes
        is valid.  Try to use [base + disp] addressing mode if possible.
        * ira.c (setup_eliminable_regset): Set frame_pointer_needed if stack
        checking is enabled and STACK_CHECK_MOVING_SP.
        * rtlanal.c (may_trap_p_1) <MEM>: If stack checking is enabled,
        return 1 for volatile references to the stack pointer.
        * tree.c (build_common_builtin_nodes): Do not set ECF_NOTHROW on
        __builtin_alloca if stack checking is enabled.
        * unwind-dw2.c (uw_identify_context): Take into account whether the
        context is that of a signal frame or not.
        * config/i386/linux.h (STACK_CHECK_MOVING_SP): Define to 1.
        * config/i386/linux64.h (STACK_CHECK_MOVING_SP): Likewise.

Added:
    trunk/gcc/testsuite/gnat.dg/stack_check1.adb
    trunk/gcc/testsuite/gnat.dg/stack_check2.adb
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/linux.h
    trunk/gcc/config/i386/linux64.h
    trunk/gcc/doc/md.texi
    trunk/gcc/doc/tm.texi
    trunk/gcc/explow.c
    trunk/gcc/expr.h
    trunk/gcc/ira.c
    trunk/gcc/rtlanal.c
    trunk/gcc/system.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c
    trunk/gcc/unwind-dw2.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10127



More information about the Gcc-bugs mailing list