RESOLVED INVALID 180320
System colors leak
https://bugs.webkit.org/show_bug.cgi?id=180320
Summary System colors leak
Alexey Proskuryakov
Reported 2017-12-02 16:00:21 PST
I'm getting a reproducible leak of NSDynamicSystemColor and NSCalibratedRGBColor when running WebKit tests. Steps to reproduce: run-webkit-tests -1 --leaks --no-retry --no-build --no-show --no-sample --debug-rwt-logging --clobber-old-results fast/css/test-setting-canvas-color.html --repeat 10
Attachments
standalone test (2.88 KB, text/plain)
2017-12-02 17:09 PST, Darin Adler
no flags
Radar WebKit Bug Importer
Comment 1 2017-12-02 16:01:05 PST
Alexey Proskuryakov
Comment 2 2017-12-02 16:04:59 PST
It looks like it has to be in this code, but I don't see the problem. if (auto selector = selectCocoaColor()) { if (auto color = wtfObjcMsgSend<NSColor *>([NSColor class], selector)) return convertNSColorToColor(color); }
Darin Adler
Comment 3 2017-12-02 16:38:15 PST
Maybe we can extract that code into a small command line tool to see if it leaks. Very little dependency on the rest of WebKit in that code.
Darin Adler
Comment 4 2017-12-02 17:09:00 PST
Created attachment 328267 [details] standalone test No leak seen with this test.
Darin Adler
Comment 5 2017-12-02 17:12:36 PST
Another thing to test: Comment out that code and see if the leak goes away.
Alexey Proskuryakov
Comment 6 2017-12-03 14:49:32 PST
Turns out that it's not every color, but [NSColor controlHighlightColor] leaks on my OS version. Will keep tracking this in radar.
Joseph Pecoraro
Comment 7 2017-12-04 10:34:20 PST
Whoa, I never know about `leaks --atExit`! I normally just added a `sleep(10000)` to my main so I could run leaks in another tab. Some good pro-tips in this thread for leaks debugging.
Note You need to log in before you can comment on or make changes to this bug.