Skip to content

Commit 6bfe9d7

Browse files
committed
modified: tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs
1 parent 24f42b4 commit 6bfe9d7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ pub fn local_large_var_cloned(f: fn(Gigastruct)) {
280280
// ```
281281

282282
// all: __security_check_cookie
283+
284+
// FIXME: How does the rust compiler handle moves of large structures?
285+
// rusty-NOT: __security_check_cookie
286+
283287
// strong: __security_check_cookie
284288
// basic: __security_check_cookie
285289
// none-NOT: __security_check_cookie
@@ -318,8 +322,14 @@ extern "C" {
318322
#[no_mangle]
319323
pub fn alloca_small_compile_time_constant_arg(f: fn(*mut ())) {
320324
f(unsafe { alloca(8) });
321-
325+
322326
// all: __security_check_cookie
327+
328+
// FIXME: Rusty thinks a function that returns a mutable raw pointer may
329+
// be a stack memory allocation function, so it performs stack smash protection.
330+
// Is it possible to optimize the heuristics?
331+
// rusty: __security_check_cookie
332+
323333
// strong-NOT: __security_check_cookie
324334
// basic-NOT: __security_check_cookie
325335
// none-NOT: __security_check_cookie

0 commit comments

Comments
 (0)