summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Notes/BugStories.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Notes/BugStories.txt b/Notes/BugStories.txt
new file mode 100644
index 00000000..0e2ca1dd
--- /dev/null
+++ b/Notes/BugStories.txt
@@ -0,0 +1,26 @@
+2019-07-13: Sizeof mismatch
+===========================
+
+librustc takes ~20mins to recompile, and that's just one crate out of ~80 in rustc
+- rustc failing on a consistency check
+- Turn on debug logging, add more to find where things become inconsistent
+- add assertion that a hashmap insert worked
+- started crashing earlier (but same place)
+- Print the map, item is there
+- Start dumping hashes, they don't match
+- Check equality of pre-hash values, they match
+- Check input to hasher, don't see anything too odd
+- Add more debug to make it easier to see the instance hashig
+- Notice the difference, a pointer difference?
+- Match the hash inputs to fields, find an odd pair with the `ty::Slice` type
+- Start chasing it's Hash impl down, it's supposed to just hash the pointer
+ - Actual impl hashes two words, not just one
+ - The source code checks sizeof to pick between one/two word hashing
+ - But post-optimisation it's always picking two
+ - Turn off that optimisation and rebuild librustc, no change?
+- Check libcore's metadata, it has the bug already (in the generic version?)
+- 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"
+
+<!-- vim: ft=markdown
+-->