[llvm-commits] [patch] Fix PR5094: -fstack-protector fails to link on Linux/x86

Eric Christopher echristo at apple.com
Mon Jul 5 15:26:05 PDT 2010


On Jul 5, 2010, at 2:28 PM, Bill Wendling wrote:

> This is in the "Generic" folder. Please don't change it like this. If the test as is can no longer be done generically, then we should find another solution.
> 
> --- a/test/CodeGen/Generic/stack-protector.ll
> +++ b/test/CodeGen/Generic/stack-protector.ll
> @@ -1,5 +1,7 @@
> -; RUN: llc < %s -o - | grep {__stack_chk_guard}
> -; RUN: llc < %s -o - | grep {__stack_chk_fail}
> +; RUN: llc -march=arm < %s -o - | grep {__stack_chk_guard}
> +; RUN: llc -march=arm < %s -o - | grep {__stack_chk_fail}
> +; Linux/x86 stores the stack cookie in a weird place. So we force an arbitrary
> +; non-x86 test to make sure codegen uses the generic case.
> 
> @"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00"		; <[11 x i8]*> [#uses=1]

Yeah, we should probably move it to x86 and ppc so that each of them have their own stack protector tests.

-eric



More information about the llvm-commits mailing list