Uploaded a fix. We may want to backport this. Like I said before, if there's a bug in the page allocator that would cause these sanity checks to fail, it would manifest as memory corruption as opposed to the immediate failure it was supposed to be.
CC @bcmills who has been tracking a bunch of the memory corruption issues.
CC @randall77@cherrymui who have been looking into some of the memory corruption issues.
I wonder whether this should become a vet check. I think with vet, we can at least find very simple instance (eg: unsigned number < 0); prove is able to find similar always-true or always-false conditions in more complicated situations which vet wouldn't be able to; but prove of course cannot emit a compile-time error.
Maybe this should go into what @dr2chase was doing, that is a log of "important information" written by the compiler during compilation.