Closed Bug 1094419 Opened 10 years ago Closed 5 years ago

LeakSanitizer leaks should be printed in descending order of size

Categories

(Testing :: Mochitest, task, P3)

task

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mccr8, Unassigned)

Details

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.

Eh, the order is good enough I suppose.

Assignee: continuation → nobody
Status: NEW → RESOLVED
Type: defect → task
Closed: 5 years ago
Priority: -- → P3
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.