Giter VIP home page Giter VIP logo

Comments (5)

fmease avatar fmease commented on July 24, 2024

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.

oli-obk avatar oli-obk commented on July 24, 2024

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.

fmease avatar fmease commented on July 24, 2024

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.

saethlin avatar saethlin commented on July 24, 2024

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.

oli-obk avatar oli-obk commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.