Commit b755446c by Richard Henderson Committed by Richard Henderson

re PR middle-end/23221 (-fstack-protector does not protect tail call functions)

        PR 23221
        * function.c (stack_protect_epilogue): Export.
        * tree.h (stack_protect_epilogue): Declare.
        * calls.c (expand_call): Call it.

From-SVN: r102731
parent a4f5cd44
2005-08-03 Richard Henderson <rth@redhat.com>
PR 23221
* function.c (stack_protect_epilogue): Export.
* tree.h (stack_protect_epilogue): Declare.
* calls.c (expand_call): Call it.
2005-08-03 Eric Christopher <echristo@apple.com>
* gcc.c (LINK_SSP_SPEC): Add fstack-protector-all.
......
......@@ -2247,6 +2247,9 @@ expand_call (tree exp, rtx target, int ignore)
if (pass && (flags & (ECF_LIBCALL_BLOCK | ECF_MALLOC)))
start_sequence ();
if (pass == 0 && cfun->stack_protect_guard)
stack_protect_epilogue ();
adjusted_args_size = args_size;
/* Compute the actual size of the argument block required. The variable
and constant sizes must be combined, the size may have to be rounded,
......
......@@ -4013,7 +4013,7 @@ stack_protect_prologue (void)
# define gen_stack_protect_test(x, y, z) (gcc_unreachable (), NULL_RTX)
#endif
static void
void
stack_protect_epilogue (void)
{
tree guard_decl = targetm.stack_protect_guard ();
......
......@@ -3908,6 +3908,7 @@ extern void dump_tree_statistics (void);
extern void expand_function_end (void);
extern void expand_function_start (tree);
extern void stack_protect_prologue (void);
extern void stack_protect_epilogue (void);
extern void recompute_tree_invarant_for_addr_expr (tree);
extern bool is_global_var (tree t);
extern bool needs_to_live_in_memory (tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment