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

Creating a tuple of a parameterized string leaks memory #153

Closed
pcwalton opened this issue Aug 26, 2010 · 1 comment
Closed

Creating a tuple of a parameterized string leaks memory #153

pcwalton opened this issue Aug 26, 2010 · 1 comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

Comments

@pcwalton
Copy link
Contributor

Test case:

fn f[T](T x) -> tup(T) {
  ret tup(x);
}

fn main() -> () {
  f("foo");
}

Result:

[pwalton@host-4-84 ~/Source/rust/src] ./bug 
allocation 0x600000 was not freed
rt: fatal, 'leaked memory in rust main loop (1 objects)' failed, rt/memory_region.cpp:99 1 objects
@graydon
Copy link
Contributor

graydon commented Jan 27, 2011

Fixed long ago (if you switch to passing the arg by &)

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
unix: Add if_indextoname and IF_NAMESIZE
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
Remove unstable and 'in the future' things.
rchaser53 pushed a commit to rchaser53/rust that referenced this issue Jan 19, 2019
A few more data structures to the code index
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 1, 2021
Rename to portable-simd and remove other names
djtech-dev pushed a commit to djtech-dev/rust that referenced this issue Dec 9, 2021
antoyo added a commit to antoyo/rust that referenced this issue Jun 7, 2022
Sort archs and make the generate predictable
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Projects
None yet
Development

No branches or pull requests

2 participants