Skip to content

Commit d6e7b5d

Browse files
author
Ariel Ben-Yehuda
committed
change wording for stack-protector-strong
1 parent 357570f commit d6e7b5d

File tree

2 files changed

+9
-5
lines changed
  • compiler/rustc_codegen_llvm/src
  • src/doc/rustc/src/codegen-options

2 files changed

+9
-5
lines changed

compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,10 @@ impl CodegenBackend for LlvmCodegenBackend {
291291
292292
The exact rules are unstable and subject to change, but
293293
currently, it generates stack protectors for functions that,
294-
*post-optimization*, contain either arrays (of any size
295-
or type) or address-taken locals.
294+
*post-optimization*, contain LLVM allocas (which
295+
include all stack allocations - including fixed-size
296+
allocations - that are used in a way that is not completely
297+
determined by static control flow).
296298
297299
none
298300
Do not generate stack canaries.

src/doc/rustc/src/codegen-options/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -691,9 +691,11 @@ Supported values for this option are:
691691

692692
The exact rules are unstable and subject to change, but
693693
currently, it generates stack protectors for functions that,
694-
*post-optimization*, contain either arrays (of any size
695-
or type) or address-taken locals.
696-
- `all`: Generate stack canaries in all functions
694+
*post-optimization*, contain LLVM allocas (which
695+
include all stack allocations - including fixed-size
696+
allocations - that are used in a way that is not completely
697+
determined by static control flow).
698+
- `all`: Generate stack canaries in all functions
697699

698700
Stack protectors are not supported on many GPU targets, use of stack
699701
protectors on these targets is an error.

0 commit comments

Comments
 (0)