Open Bug 884212 Opened 11 years ago Updated 2 years ago

Leak with nested @media rules

Categories

(Core :: CSS Parsing and Computation, defect)

x86_64
macOS
defect

Tracking

()

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: memory-leak, testcase, Whiteboard: [MemShrink:P3])

Attachments

(2 files)

Attached file testcase
      No description provided.
Whiteboard: [MemShrink] → [MemShrink:P3]
Assignee: nobody → continuation
I can't reproduce a leak.  Is there anything more to this than "open test case, exit browser" to reproduce? I'm a few days behind trunk, so maybe I'm just missing the regression.
Still happens for me on mozilla-central (3b955f306226).
Attached file leak log
GroupRule, MediaRule, nsMediaList, nsTArray_base
For posterity, the reason I thought I couldn't reproduce the leak is that the little leak summary at the end of a run, when you don't tell it to show you leaks, is just strings, and in this particular case it is a small leak that doesn't leak strings.
I looked at this a little, to try out some fancy new leak investigating tool I'm working on.  According to that, nothing allocated by jemalloc has a reference to the MediaRule, but maybe that's buggy.  I did notice that MediaRule and MediaQueryList should CC the nsMediaLists they hold onto, but that didn't fix the leak.
I did refcount logging on the MediaRule, but it just showed a stack in the CSS parser, which I assume is not very useful.  The code looked reasonable enough.  Maybe I need to make my conservative scanner fuzzier.
I looked at this again, and it is still showing up the same way: one missing reference to the media rule, no pointers to it that I can see in the heap.  That suggests some code somewhere bungling refcounting rather than missing CC traversing.
Any updates on this matter? Does this memory leak still exist? Was it patched when firefox changed to stylo?
Flags: needinfo?(continuation)
I've looked at this leak here and there since I last posted, but I haven't been able to make any progress on it. I haven't tried since Stylo landed so I don't know if this is still a problem or not.
Assignee: continuation → nobody
Flags: needinfo?(continuation)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: