-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
leaked memory in rust main loop of ARM #6231
Comments
It looks to me that some managed boxes allocated in new task remain unreclaimed. |
Looks like spawning new task yields this error. |
I suspect task local data is not being cleaned up properly. |
I'll take a look into this sometime. |
I've confirmed that at least some of the leaks are from TLS (task-local storage) |
This is a combination of at least two problems:
The first bug is only evident because of the latter. |
Here's a reduced test case that shows the problem with TLS.
|
This pull request fixes the main problem: #6493 For some reason I'm still seeing the test runner report some of the spawning tests as failures even though they aren't leaking and appear to be running successfully, but I'm assuming that's a different problem. |
Opened #6494 about the box annihilator. |
It uses the private field of TCB head to store stack limit. I tested on my Raspberry PI. A simple hello world program ran without any problem. However, for a more complex program, it segfaulted as #6231.
This is fixed. Closing. |
…ednet `while_let_on_iterator` Improvements fixes: rust-lang#6491 fixes: rust-lang#6231 fixes: rust-lang#5844 fixes: rust-lang#1924 fixes: rust-lang#1033 The check for whether a field can be borrowed should probably be moved to utils at some point, but it would require some cleanup work and knowing what parts can actually be shared. changelog: Suggest `&mut iter` when the iterator is used after the loop. changelog: Suggest `&mut iter` when the iterator is a field in a struct. changelog: Don't lint when the iterator is a field in a struct, and the struct is used in the loop. changelog: Lint when the loop is nested in another loop, but suggest `&mut iter` unless the iterator is from a local declared inside the loop.
most of ARM test cases ended with segmentation fault
leaked memory in rust main loop (n objects)
/home/yichoi/rust_work/src/rt/memory_region.cpp:189: memory_region::~memory_region(): assertion "false" failed
segmentation fault
The text was updated successfully, but these errors were encountered: