summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/stack-protector.c
Commit message (Collapse)AuthorAgeFilesLines
* [Clang] Implement function attribute no_stack_protector.Manoj Gupta2018-05-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | Summary: This attribute tells clang to skip this function from stack protector when -stack-protector option is passed. GCC option for this is: __attribute__((__optimize__("no-stack-protector"))) and the equivalent clang syntax would be: __attribute__((no_stack_protector)) This is used in Linux kernel to selectively disable stack protector in certain functions. Reviewers: aaron.ballman, rsmith, rnk, probinson Reviewed By: aaron.ballman Subscribers: probinson, srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D46300 llvm-svn: 331925
* Stricter checks in the stack-protector codegen test.Evgeniy Stepanov2016-04-121-2/+2
| | | | llvm-svn: 266095
* Allow simultaneous safestack and stackprotector attributes.Evgeniy Stepanov2016-04-111-17/+20
| | | | | | | | | This is the clang part of http://reviews.llvm.org/D18846. SafeStack instrumentation pass adds stack protector canaries if both attributes are present on a function. StackProtector pass will step back if the function has a safestack attribute. llvm-svn: 266005
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-291-5/+5
| | | | | | | | | | | | | cases Several tests wouldn't pass when executed on an armv7a_pc_linux triple due to the non-default arm_aapcs calling convention produced on the function definitions in the IR output. Account for this with the application of a little regex. Patch by Ying Yi. llvm-svn: 240971
* Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne2015-06-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Clang command line option and function attribute This patch adds the -fsanitize=safe-stack command line argument for clang, which enables the Safe Stack protection (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of Clang. The patches make the following changes: - Add -fsanitize=safe-stack and -fno-sanitize=safe-stack options to clang to control safe stack usage (the safe stack is disabled by default). - Add __attribute__((no_sanitize("safe-stack"))) attribute to clang that can be used to disable the safe stack for individual functions even when enabled globally. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6095 llvm-svn: 239762
* [stackprotector] Add command line option -fstack-protector-strongJosh Magee2014-02-111-1/+5
| | | | | | | | | | This option has the following effects: * It adds the sspstrong IR attribute to each function within the CU. * It defines the macro __SSP_STRONG__ with the value of 2. Differential Revision: http://llvm-reviews.chandlerc.com/D2717 llvm-svn: 201120
* Attempt to clean up tests for non-X86 platforms.Bill Wendling2013-02-201-9/+3
| | | | llvm-svn: 175652
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-201-3/+15
| | | | | | function attributes. llvm-svn: 175606
* Fix for ARM: functions don't have extra attributes there, so {{.*}} is ""Dmitri Gribenko2013-02-171-3/+7
| | | | | | While there, explicitly declare functions to remove warnings. llvm-svn: 175384
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-151-3/+3
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-3/+3
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Use '-FOO' 'BAR' instead of '-FOO=BAR' for FOO in -stack-protector, ↵Daniel Dunbar2009-11-291-3/+3
| | | | | | -fvisibility, and -fconstant-string-class. llvm-svn: 90072
* Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,Daniel Dunbar2009-11-171-12/+6
| | | | | | | instead of using getDefaultLangOptions. - Remove unused -fobjc-tight-layout while at it. llvm-svn: 89065
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-12/+12
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Speed up testing by avoiding stdio.h, also helps testing on windows.Mike Stump2009-10-081-2/+1
| | | | | | Patch by John Thompson. llvm-svn: 83593
* Add stack protector support to clang. This generates the 'ssp' and 'sspreq'Bill Wendling2009-06-281-0/+22
function attributes. There are predefined macros that are defined when stack protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with -fstack-protector-all. llvm-svn: 74405
OpenPOWER on IntegriCloud