⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249273 in webkit


Ignore:
Timestamp:
Aug 29, 2019, 8:25:32 AM (7 years ago)
Author:
Chris Dumez
Message:

Crash when mach_port_deallocate() returns KERN_INVALID_NAME
https://bugs.webkit.org/show_bug.cgi?id=201248
<rdar://problem/54813890>

Reviewed by Alex Christensen.

  • wtf/cocoa/MachSendRight.cpp:

(WTF::deallocateSendRightSafely):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r249092 r249273  
     12019-08-29  Chris Dumez  <cdumez@apple.com>
     2
     3        Crash when mach_port_deallocate() returns KERN_INVALID_NAME
     4        https://bugs.webkit.org/show_bug.cgi?id=201248
     5        <rdar://problem/54813890>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * wtf/cocoa/MachSendRight.cpp:
     10        (WTF::deallocateSendRightSafely):
     11
    1122019-08-25  Fujii Hironori  <Hironori.Fujii@sony.com>
    213
  • trunk/Source/WTF/wtf/cocoa/MachSendRight.cpp

    r237099 r249273  
    3131#include <utility>
    3232
     33#define LOG_CHANNEL_PREFIX Log
     34
    3335namespace WTF {
     36
     37#if RELEASE_LOG_DISABLED
     38WTFLogChannel LogProcess = { WTFLogChannelState::On, "Process", WTFLogLevel::Error };
     39#else
     40WTFLogChannel LogProcess = { WTFLogChannelState::On, "Process", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT };
     41#endif
    3442
    3543static void retainSendRight(mach_port_t port)
     
    6674        return;
    6775
    68     LOG_ERROR("mach_port_deallocate error for port %d: %s (%#x)", port, mach_error_string(kr), kr);
    69     if (kr == KERN_INVALID_RIGHT)
     76    RELEASE_LOG_ERROR(Process, "mach_port_deallocate error for port %d: %{private}s (%#x)", port, mach_error_string(kr), kr);
     77    if (kr == KERN_INVALID_RIGHT || kr == KERN_INVALID_NAME)
    7078        CRASH();
    7179}
Note: See TracChangeset for help on using the changeset viewer.