Open Bug 1094419 Opened 5 years ago Updated 5 years ago
Sanitizer leaks should be printed in descending order of size
Currently, leaking stacks are added to a set, so they get printed out in some kind of odd order. Mostly this doesn't matter, but in giant leaks like bug 1086172, we just always end up with some AllocateProtoAndIfaceCache stuff near the top, and the first few entries affect how it is starred on TBPL. This means that multiple unrelated issues get starred identically. Separately, I should add some more of the JS allocation functions to |unescapedSkipList|. See bug 1086172.
It doesn't look like you're currently recording the leak size at all, but if you did that, then you could store tuples of (leak size, stack) in foundFrames, and then change process to do: for size, f in sorted(self.foundFrames, key=operator.itemgetter(0)):
They are actually printed in order of descending size by LSan originally, so I was thinking of just recording the original order rather than try to mess with a finicky regexp. Though that will only work if we continue to only report direct leaks. The question is whether I should continue to drop duplicate frames or not.
You need to log in before you can comment on or make changes to this bug.