|
|
|
|
|
by sfackler
3984 days ago
|
|
I ran that code through Valgrind on x86_64 Linux and am finding that the leaks described in that issue no longer exist: https://gist.github.com/sfackler/1f7d4dc0c171be6b6b54. There are 32 bytes leaked out of some internal runtime code, but they are allocated once globally, not "whenever a thread closes". The code that generated the allocation that leaked in that issue (std::io::with_task_stdout) no longer exists, and I believe the thread local storage system has been rewritten since then as well. Could you clarify how that issue is relevant to modern Rust? |
|
Alex Crichton, one of Rust's top contributors, confirmed that the problem is still present a day ago. He acknowledged this on one of the very issues the original comment was in reference to.
See https://github.com/rust-lang/rust/issues/19776
alexcrichton commented a day ago @huonw did you test on linux? You may have been using the ELF TLS instead of pthread tls. I just built a compiler with --disable-elf-tls and it looks like the leak is still present:
It's exceptionally too bad the person who originally pointed this out in the comments here felt the need to delete their comment.