Skip to content

Commit a39d93d

Browse files
authored
Rollup merge of #51666 - marco-c:disable_probestack, r=nagisa
Disable probestack when GCOV profiling is being used If I compile Firefox with gcov profiling enabled, Firefox crashes at startup because of probestack. Since it's disabled for PGO, I think it makes sense to disable it for gcov too.
2 parents bac6cc9 + e9aacfd commit a39d93d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_codegen_llvm/attributes.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ pub fn set_probestack(cx: &CodegenCx, llfn: ValueRef) {
9898
return;
9999
}
100100

101+
// probestack doesn't play nice either with gcov profiling.
102+
if cx.sess().opts.debugging_opts.profile {
103+
return;
104+
}
105+
101106
// Flag our internal `__rust_probestack` function as the stack probe symbol.
102107
// This is defined in the `compiler-builtins` crate for each architecture.
103108
llvm::AddFunctionAttrStringValue(

0 commit comments

Comments
 (0)