Bug 214490 - [iOS] Crash under WebProcess::handleXPCEndpointMessages
Summary: [iOS] Crash under WebProcess::handleXPCEndpointMessages
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-17 11:48 PDT by Per Arne Vollan
Modified: 2020-07-17 12:31 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.61 KB, patch)
2020-07-17 11:51 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (1.60 KB, patch)
2020-07-17 11:57 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2020-07-17 11:48:39 PDT
According to crash logs, it seems possible that the parent process XPC connection can be null. Add a null check, and also check that the connection XPC object really is an XPC connection object.
Comment 1 Per Arne Vollan 2020-07-17 11:48:59 PDT
rdar://problem/65717136
Comment 2 Per Arne Vollan 2020-07-17 11:51:39 PDT
Created attachment 404579 [details]
Patch
Comment 3 Chris Dumez 2020-07-17 11:52:20 PDT
Comment on attachment 404579 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404579&action=review

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:177
> +    if (xpc_get_type(connection) != XPC_TYPE_CONNECTION)

I think this should be an assertion.
Comment 4 Per Arne Vollan 2020-07-17 11:57:23 PDT
Created attachment 404580 [details]
Patch
Comment 5 Per Arne Vollan 2020-07-17 11:57:44 PDT
(In reply to Chris Dumez from comment #3)
> Comment on attachment 404579 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=404579&action=review
> 
> > Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:177
> > +    if (xpc_get_type(connection) != XPC_TYPE_CONNECTION)
> 
> I think this should be an assertion.

Fixed.

Thanks for reviewing!
Comment 6 Chris Dumez 2020-07-17 11:58:18 PDT
Comment on attachment 404580 [details]
Patch

r=me
Comment 7 EWS 2020-07-17 12:31:00 PDT
Committed r264529: <https://trac.webkit.org/changeset/264529>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404580 [details].