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

Leak with do loops #1257

Closed
brson opened this issue Dec 4, 2011 · 2 comments
Closed

Leak with do loops #1257

brson opened this issue Dec 4, 2011 · 2 comments

Comments

@brson
Copy link
Contributor

brson commented Dec 4, 2011

fn main () {
    let line = "";
    let i = 0;
    do {
        line = if i == 3 { "exit" } else { "notexit" };
        i += 1;
    } while line != "exit";
}

This leaks the string.

lht added a commit to lht/rust that referenced this issue Dec 4, 2011
@lht
Copy link
Contributor

lht commented Dec 4, 2011

Root cause is the condition BB missed a cleanup.

@brson
Copy link
Contributor Author

brson commented Dec 4, 2011

Merged. Thanks.

@brson brson closed this as completed Dec 4, 2011
bjorn3 added a commit to bjorn3/rust that referenced this issue Aug 24, 2022
Fix alignment flag for emit_small_memory_copy
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
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