-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Ensure stack in two places that affect s390x #142047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This solve a stack overflow found on Fedora s390x when building `tests/ui/parser/survive-peano-lesson-queue.rs`. Note that the singular `mirror_expr` method already has this stack check, but in this case the plural method was the one recursing too deeply.
This solve a stack overflow found on Fedora s390x when building `tests/ui/associated-consts/issue-93775.rs`.
so completely randomly: how does stack work on s390x, @cuviper? is it a normal architecture from the perspective of Rust code, with a stack guard page and normal signals? |
@bors r+ rollup |
AFAIK it is normal in that regard, so these overflows still hit a SIGSEGV and executed rustc's handler, including the cycle-detecting backtrace which helped me see where we needed the ensure checks. The SystemZ backend just has different optimization tuning that can sometimes cause problems that we don't see on others, like inlining thresholds are probably the culprit here. These particular test cases do fail on e.g. x86_64 as well if you tighten the default |
Ensure stack in two places that affect s390x In our Fedora s390x test results, we found two tests that started hitting stack overflows in the 1.87.0 update. It seems to be related in some part to our use of PGO as well, probably inlining more into stack frames that were already recursive. The main points of recursion that I identified were: - `ui/parser/survive-peano-lesson-queue.rs` in `ThirBuildCx::mirror_exprs` - `ui/associated-consts/issue-93775.rs` in `Parser::parse_ty` A couple new `ensure_sufficient_stack` calls will solve these tests.
Rollup of 11 pull requests Successful merges: - #125087 (Optimize `Seek::stream_len` impl for `File`) - #141982 (`tests/ui`: A New Order [5/N]) - #142012 (Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None) - #142044 (compiler: Document the offset invariant of `OperandValue::Pair`) - #142047 (Ensure stack in two places that affect s390x) - #142058 (Clean `rustc_attr_parsing/src/lib.rs` documentation) - #142067 (canon_abi: make to_erased_extern_abi just a detail in formatting) - #142072 (doc: Fix inverted meaning in E0783.md) - #142084 (add myself to rotation) - #142091 (Fix AIX build) - #142092 (rustdoc: Support middle::ty associated const equality predicates again) Failed merges: - #142042 (Make E0621 missing lifetime suggestion verbose) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - #125087 (Optimize `Seek::stream_len` impl for `File`) - #141982 (`tests/ui`: A New Order [5/N]) - #142012 (Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None) - #142044 (compiler: Document the offset invariant of `OperandValue::Pair`) - #142047 (Ensure stack in two places that affect s390x) - #142058 (Clean `rustc_attr_parsing/src/lib.rs` documentation) - #142067 (canon_abi: make to_erased_extern_abi just a detail in formatting) - #142072 (doc: Fix inverted meaning in E0783.md) - #142084 (add myself to rotation) - #142091 (Fix AIX build) - #142092 (rustdoc: Support middle::ty associated const equality predicates again) Failed merges: - #142042 (Make E0621 missing lifetime suggestion verbose) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - #125087 (Optimize `Seek::stream_len` impl for `File`) - #141982 (`tests/ui`: A New Order [5/N]) - #142012 (Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None) - #142044 (compiler: Document the offset invariant of `OperandValue::Pair`) - #142047 (Ensure stack in two places that affect s390x) - #142058 (Clean `rustc_attr_parsing/src/lib.rs` documentation) - #142067 (canon_abi: make to_erased_extern_abi just a detail in formatting) - #142072 (doc: Fix inverted meaning in E0783.md) - #142084 (add myself to rotation) - #142091 (Fix AIX build) - #142092 (rustdoc: Support middle::ty associated const equality predicates again) Failed merges: - #142042 (Make E0621 missing lifetime suggestion verbose) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142047 - cuviper:s390x-stack, r=oli-obk Ensure stack in two places that affect s390x In our Fedora s390x test results, we found two tests that started hitting stack overflows in the 1.87.0 update. It seems to be related in some part to our use of PGO as well, probably inlining more into stack frames that were already recursive. The main points of recursion that I identified were: - `ui/parser/survive-peano-lesson-queue.rs` in `ThirBuildCx::mirror_exprs` - `ui/associated-consts/issue-93775.rs` in `Parser::parse_ty` A couple new `ensure_sufficient_stack` calls will solve these tests.
Rollup of 11 pull requests Successful merges: - rust-lang/rust#125087 (Optimize `Seek::stream_len` impl for `File`) - rust-lang/rust#141982 (`tests/ui`: A New Order [5/N]) - rust-lang/rust#142012 (Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None) - rust-lang/rust#142044 (compiler: Document the offset invariant of `OperandValue::Pair`) - rust-lang/rust#142047 (Ensure stack in two places that affect s390x) - rust-lang/rust#142058 (Clean `rustc_attr_parsing/src/lib.rs` documentation) - rust-lang/rust#142067 (canon_abi: make to_erased_extern_abi just a detail in formatting) - rust-lang/rust#142072 (doc: Fix inverted meaning in E0783.md) - rust-lang/rust#142084 (add myself to rotation) - rust-lang/rust#142091 (Fix AIX build) - rust-lang/rust#142092 (rustdoc: Support middle::ty associated const equality predicates again) Failed merges: - rust-lang/rust#142042 (Make E0621 missing lifetime suggestion verbose) r? `@ghost` `@rustbot` modify labels: rollup
In our Fedora s390x test results, we found two tests that started hitting stack
overflows in the 1.87.0 update. It seems to be related in some part to our use
of PGO as well, probably inlining more into stack frames that were already
recursive. The main points of recursion that I identified were:
ui/parser/survive-peano-lesson-queue.rs
inThirBuildCx::mirror_exprs
ui/associated-consts/issue-93775.rs
inParser::parse_ty
A couple new
ensure_sufficient_stack
calls will solve these tests.