RESOLVED FIXED 189685
[macOS] Frequent leaks seen under WebCore::gpuIDForDisplayMask
https://bugs.webkit.org/show_bug.cgi?id=189685
Summary [macOS] Frequent leaks seen under WebCore::gpuIDForDisplayMask
Joseph Pecoraro
Reported 2018-09-17 18:02:06 PDT
I'm seeing leaks in Safari Technology Preview under WebCore::gpuIDForDisplayMask: STACK OF 1 INSTANCE OF 'ROOT LEAK: <0x7f91804bee50>': 58 libdyld.dylib 0x7fff5b67a085 start + 1 57 com.apple.AppKit 0x7fff2b99ee97 NSApplicationMain + 780 ... 5 com.apple.WebKit 0x1088c2a0f WebKit::WebProcessPool::platformInitializeWebProcess(WebKit::WebProcessCreationParameters&) + 1359 4 com.apple.WebCore 0x109aa9064 WebCore::collectScreenProperties() + 900 3 com.apple.WebCore 0x109aa9335 WebCore::gpuIDForDisplayMask(unsigned int) + 37 2 com.apple.opengl 0x7fff3857fb2d CGLQueryRendererInfo + 529 1 libsystem_malloc.dylib 0x7fff5b827783 malloc + 24 0 libsystem_malloc.dylib 0x7fff5b82782b malloc_zone_malloc + 139 ==== 24 (6.75K) << TOTAL >> 1 (288 bytes) ROOT LEAK: 0x7f9164707d40 [288] 1 (288 bytes) ROOT LEAK: 0x7f9164713e60 [288] 1 (288 bytes) ROOT LEAK: 0x7f91647272c0 [288] 1 (288 bytes) ROOT LEAK: 0x7f9164739010 [288] We should be calling CGLDestroyRendererInfo at some point on the renderer we got from CGLQueryRendererInfo.
Attachments
[PATCH] Proposed Fix (1.94 KB, patch)
2018-09-17 18:03 PDT, Joseph Pecoraro
no flags
[PATCH] Proposed Fix (1.94 KB, patch)
2018-09-17 19:11 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2018-09-17 18:03:59 PDT
Created attachment 349982 [details] [PATCH] Proposed Fix
Radar WebKit Bug Importer
Comment 2 2018-09-17 18:04:20 PDT
EWS Watchlist
Comment 3 2018-09-17 18:06:17 PDT Comment hidden (obsolete)
Joseph Pecoraro
Comment 4 2018-09-17 19:11:47 PDT
Created attachment 349990 [details] [PATCH] Proposed Fix
Per Arne Vollan
Comment 5 2018-09-17 19:52:28 PDT
Comment on attachment 349990 [details] [PATCH] Proposed Fix r=me.
WebKit Commit Bot
Comment 6 2018-09-18 11:30:12 PDT
Comment on attachment 349990 [details] [PATCH] Proposed Fix Clearing flags on attachment: 349990 Committed r236148: <https://trac.webkit.org/changeset/236148>
WebKit Commit Bot
Comment 7 2018-09-18 11:30:14 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 8 2018-09-18 20:18:04 PDT
Joe, for cases like this we might also want to consider a std::unique_ptr with a custom deleter. This is one way to avoid repeating the destruction code so many times.
Note You need to log in before you can comment on or make changes to this bug.