Skip to content
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

Deallocator running out of stack space #8295

Closed
jjwhitney opened this issue Aug 5, 2013 · 2 comments
Closed

Deallocator running out of stack space #8295

jjwhitney opened this issue Aug 5, 2013 · 2 comments

Comments

@jjwhitney
Copy link

Deallocation of object chains seems to require stack space proportional to the size of the chain. The following example, for instance, fails with a "ran out of stack" error:

extern mod extra;

use extra::dlist::DList;
use extra::container::Deque;

fn main() {
    let mut m = ~ DList::new::<int>();

    for _ in range(0, 17000000) {
        m.push_front(0);
    }
    println("This line is printed");
    // Does not exit cleanly: "ran out of stack"
}
@brson
Copy link
Contributor

brson commented Aug 5, 2013

This is a problem for the new scheduler that doesn't yet implement split stacks. The Node dtor tail-recurses and the dlist benchmarks overflow the stack.

brson added a commit to brson/rust that referenced this issue Aug 5, 2013
The compiler-generated dtor for DList recurses deeply to drop Nodes.
For big lists this can overflow the stack.
@brson
Copy link
Contributor

brson commented Aug 5, 2013

Fixed.

@brson brson closed this as completed Aug 5, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 17, 2022
Handle implicit named arguments in `useless_format`

fixes rust-lang#8290

Ideally this would fix the macro parsing code to handle this, but this is a smaller change and easier to back port.

changelog: Handle implicit named arguments in `useless_format`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants