RESOLVED FIXED Bug 230187
[Cocoa] Drawing the rounded system ui font into canvas causes a crash
https://bugs.webkit.org/show_bug.cgi?id=230187
Summary [Cocoa] Drawing the rounded system ui font into canvas causes a crash
Myles C. Maxfield
Reported 2021-09-11 01:56:51 PDT
[Cocoa] Drawing the rounded system ui font into canvas causes a crash
Attachments
Patch (8.32 KB, patch)
2021-09-11 01:59 PDT, Myles C. Maxfield
no flags
Patch (7.12 KB, patch)
2021-09-11 16:52 PDT, Myles C. Maxfield
no flags
Patch (7.12 KB, patch)
2021-09-11 18:15 PDT, Myles C. Maxfield
no flags
Patch (7.12 KB, patch)
2021-09-11 18:16 PDT, Myles C. Maxfield
wenson_hsieh: review+
Fix leak (1.66 KB, patch)
2021-09-13 09:57 PDT, Wenson Hsieh
mmaxfield: review+
Myles C. Maxfield
Comment 1 2021-09-11 01:59:36 PDT
Myles C. Maxfield
Comment 2 2021-09-11 01:59:38 PDT
Myles C. Maxfield
Comment 3 2021-09-11 16:52:36 PDT
Myles C. Maxfield
Comment 4 2021-09-11 18:15:42 PDT
Myles C. Maxfield
Comment 5 2021-09-11 18:16:36 PDT
Wenson Hsieh
Comment 6 2021-09-12 11:43:51 PDT
Comment on attachment 437975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437975&action=review > Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:517 > if (!fontDescriptor) > return nullptr; What do you think about using `CTFontDescriptorCreateLastResort()` here as a sort of failsafe (perhaps with an `ASSERT_NOT_REACHED` so that we're still able to catch instances where we would've otherwise failed to decode)?
Myles C. Maxfield
Comment 7 2021-09-12 19:24:26 PDT
Comment on attachment 437975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437975&action=review >> Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:517 >> return nullptr; > > What do you think about using `CTFontDescriptorCreateLastResort()` here as a sort of failsafe (perhaps with an `ASSERT_NOT_REACHED` so that we're still able to catch instances where we would've otherwise failed to decode)? That is a good idea!
Myles C. Maxfield
Comment 8 2021-09-12 20:23:08 PDT
Wenson Hsieh
Comment 9 2021-09-13 09:57:55 PDT
Reopening to attach new patch.
Wenson Hsieh
Comment 10 2021-09-13 09:57:56 PDT
Created attachment 438049 [details] Fix leak
Myles C. Maxfield
Comment 11 2021-09-13 12:41:26 PDT
Wenson Hsieh
Comment 12 2021-10-11 09:42:08 PDT
*** Bug 231495 has been marked as a duplicate of this bug. ***
Myles C. Maxfield
Comment 13 2021-10-14 23:05:49 PDT
*** Bug 231686 has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 14 2021-10-19 17:47:37 PDT
*** Bug 231988 has been marked as a duplicate of this bug. ***
Sam Sneddon [:gsnedders]
Comment 15 2021-10-21 02:11:57 PDT
*** Bug 232043 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.