diff options
| author | kennytm <kennytm@gmail.com> | 2018-06-22 16:50:44 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-22 16:50:44 +0800 |
| commit | a39d93d899ef045f18d677275947736a1d1a3aa0 (patch) | |
| tree | 0d735d42c96e43fa6577aafc5321668d8bfcce92 | |
| parent | bac6cc98e5d3a74df1a384bee93e65f51d906738 (diff) | |
| parent | e9aacfd5c1947d0333887689f1569cf9e2cb2e12 (diff) | |
| download | rust-a39d93d899ef045f18d677275947736a1d1a3aa0.tar.gz rust-a39d93d899ef045f18d677275947736a1d1a3aa0.zip | |
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.
| -rw-r--r-- | src/librustc_codegen_llvm/attributes.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs index a5d04c5c576..429acbbe0c2 100644 --- a/src/librustc_codegen_llvm/attributes.rs +++ b/src/librustc_codegen_llvm/attributes.rs @@ -98,6 +98,11 @@ pub fn set_probestack(cx: &CodegenCx, llfn: ValueRef) { return; } + // probestack doesn't play nice either with gcov profiling. + if cx.sess().opts.debugging_opts.profile { + return; + } + // Flag our internal `__rust_probestack` function as the stack probe symbol. // This is defined in the `compiler-builtins` crate for each architecture. llvm::AddFunctionAttrStringValue( |
