diff options
Diffstat (limited to 'Notes')
| -rw-r--r-- | Notes/BugStories.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Notes/BugStories.txt b/Notes/BugStories.txt index 0e2ca1dd..b7437fb6 100644 --- a/Notes/BugStories.txt +++ b/Notes/BugStories.txt @@ -22,5 +22,27 @@ librustc takes ~20mins to recompile, and that's just one crate out of ~80 in rus - Enable optimisation debug and rebuild libcore - Oh look, `sizeof<*const T>` where `T: ?Sized` is returning 16 instead of returning "I don't know yet" + +2019-07-20: Leaking MPSC handles +================================ + +- rustc just stopping after codegen +- gdb backtrace shows only one thread, waiting on a MPSC receiver +- add debugging for MPSC Shared handles for that specific type, LOOTS of them being made (testing on a 14 core machine) +- Turn down codegen units to 1, now a total of 6 handles (much easier) +- Check all allocation paths, looks like all of them should call the destructor on the returned handle... + - One path hands a handle to a thread, let's chase that down + - Nope... that destuctor does get called... hmm... +- Break down (after two weekends) and hack in handle indexes to mpsc::Shared + (on clone, allocate a unique ID and store that in the handle). +- Re-run, printing the handle indexes - Notice that one code path (two + handles) leaks its handles +- Re-check, the destructor is called... but I can't break on it? +- Chase down the call chain, reach a Box drop impl (wait... that exists, I + thought the compiler made a custom one) + - It does absolutely nothing. No free, no destructor... oops +- Turns out that 1.29 added a no-op Drop impl for Box (1.19 didn't have one), which + caused mrustc's magic Drop impl to not be created. + <!-- vim: ft=markdown --> |
