Skip to content

out of memory #115414

Closed
Closed
@matthiaskrgr

Description

I tried this code:
I found this code would make rustc eat more than 20 gb of memory until OOM killer stopped it

fn T<T>(x: &T::<T::<T::<T::<T::<T::<T::<x, HT::U<T::<T::<x, T::<T::<T::<T::<T::<T::<T::<T::<x, T::<T, T>>T::<x, HT::U<T::<T::<x, T::<T::<TT::<T::(<T::<T)::<x, )T>>, T>>, T::<T:T, T>>>>>, T>>, T>>>, T::<x, T::<T::<T::<>>, T

I expected to see this happen: explanation

Instead, this happened: explosion

Meta

rustc --version --verbose:

rustc 1.74.0-nightly (59a829484 2023-08-30)
binary: rustc
commit-hash: 59a8294849358a878a72358aa6d5fe5b9d312867
commit-date: 2023-08-30
host: x86_64-unknown-linux-gnu
release: 1.74.0-nightly
LLVM version: 17.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcI-compilememIssue: Problems and improvements with respect to memory usage during compilation.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions