Comments (5)
NB: This only affects polymorphically recursive calls (i.e., calls where the generic args change at each step). Normal recursive calls lead to cycle errors.
from rust.
Hmm... The immediate solution I can come up with is to use the recursion limit to limit query depth, but that's going to be hard to tune to a good value without breaking random crates (most likely binary crates that we don't see on crater).
from rust.
The immediate solution I can come up with is to use the recursion limit to limit query depth
That would also solve #114192.
from rust.
I think there might be something else going on here. If I try to compile this reproducer I get a freeze with growing memory usage, which is what I would expect.
But if I try to ctrl-c the process, I... get a segfault?
╭ ➜ ben@archlinux:/tmp
╰ ➤ rustc +nightly ice.rs --crate-type=lib
^Cerror: rustc interrupted by SIGSEGV, printing backtrace
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x3150996)[0x7de413b50996]
/usr/lib/libc.so.6(+0x3cae0)[0x7de410850ae0]
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-45288dcc88911a1f.so(_ZN4core3fmt5write17hd4702675b19bc4d7E+0x8)[0x7de417308518]
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x575c169)[0x7de41615c169]
### cycle encountered after 4 frames with period 6
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x575b40d)[0x7de41615b40d]
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x575c19b)[0x7de41615c19b]
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x575b40d)[0x7de41615b40d]
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x575c19b)[0x7de41615c19b]
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x575b40d)[0x7de41615b40d]
/home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-4f8cb1b2fa29bc89.so(+0x575c19b)[0x7de41615c19b]
### recursed 42 times
note: rustc unexpectedly overflowed its stack! this is a bug
note: maximum backtrace depth reached, frames may have been lost
note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
Segmentation fault (core dumped)
from rust.
It probably tries to run the Ctrl-C handler and emit a mir interpreter backtrace, but that logic doesn't use ensure_sufficient_stack
and hits the stack overflow protection. Queries on the other band just allocate more stack when necessary
from rust.
Related Issues (20)
- ICE: kcfi: encode_const: unexpected kind `UnevaluatedConst { .. }`
- Japanese translation of Rust by Example is broken HOT 2
- Reference to temporary variable passed as `&'static dyn` parameter compiles HOT 2
- What should SIMD bitmasks look like? HOT 6
- clarify local_crate_exports_generics
- Miscompile for `riscv64gc-unknown-none-elf` using `inout()` in `asm!()` HOT 1
- "you might have meant to return this value" suggests invalid syntax HOT 1
- tidy error: rustc-perf workspace doesn't have a Cargo.lock
- inherent method selection uses subtyping even when using paths
- "./x.py run miri --stage 1" no longer works HOT 5
- Bootstrap rustc wrapper verbosity not tracked
- Mutex isn't guaranteed to have atomic acquire/release semantics HOT 13
- `unnameable_types` lint emits incorrect visibility syntax HOT 1
- Suggest adding `{ .. }` on accidental usage of unit variant pattern for a struct variant HOT 3
- Arity errors suggest incorrect fix when there are name errors
- Doctest doesn't print valid assert file line and column location link HOT 10
- PowerPC test failures due to "similarly named associated type" HOT 4
- mir-opt tests fail on big endian HOT 4
- run-make: audit `//@ ignore-cross-compile` rmake.rs tests HOT 3
- ICE: `overflow computing relative variant idx` in `rustc_const_eval/src/interpret/discriminant.rs` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.