Bug 205419

Summary: IPC::Connection::sendMessage() should use CRASH_WITH_INFO()
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit2Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, ggaren, mark.lam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 214713    
Attachments:
Description Flags
Patch v1
none
Patch v2
none
Patch for landing none

Description David Kilzer (:ddkilzer) 2019-12-18 15:07:20 PST
IPC::Connection::sendMessage() should use CRASH_WITH_INFO() to encode kern_return_t error code and hash of message name.

<rdar://problem/58058661>
Comment 1 David Kilzer (:ddkilzer) 2019-12-18 15:11:31 PST
Created attachment 386014 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2019-12-18 15:25:12 PST
Created attachment 386018 [details]
Patch v2
Comment 3 Mark Lam 2019-12-18 15:49:47 PST
Comment on attachment 386018 [details]
Patch v2

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

> Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm:277
> +        WebKit::setCrashReportApplicationSpecificInformation((__bridge CFStringRef)[NSString stringWithFormat:@"Unhandled error code %x, message '%s'", kr, messageName.data()]);

nit: Might as well log messageName.hash() as well.
Comment 4 David Kilzer (:ddkilzer) 2020-01-08 10:35:50 PST
Created attachment 387113 [details]
Patch for landing
Comment 5 David Kilzer (:ddkilzer) 2020-01-08 10:36:48 PST
Comment on attachment 386018 [details]
Patch v2

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

>> Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm:277
>> +        WebKit::setCrashReportApplicationSpecificInformation((__bridge CFStringRef)[NSString stringWithFormat:@"Unhandled error code %x, message '%s'", kr, messageName.data()]);
> 
> nit: Might as well log messageName.hash() as well.

Done.  Thanks!
Comment 6 WebKit Commit Bot 2020-01-08 11:26:11 PST
Comment on attachment 387113 [details]
Patch for landing

Clearing flags on attachment: 387113

Committed r254208: <https://trac.webkit.org/changeset/254208>
Comment 7 WebKit Commit Bot 2020-01-08 11:26:13 PST
All reviewed patches have been landed.  Closing bug.