VirtualBox

Changeset 8510 in vbox


Ignore:
Timestamp:
Apr 30, 2008 2:37:45 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30403
Message:

Workaround for #2807. It's probably not the right thing, but it seems to do the trick.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/darwin/iokit.cpp

    r8485 r8510  
    503503        if (pNotify->NotifyRLSrc)
    504504        {
    505             CFRunLoopAddSource(CFRunLoopGetCurrent(), pNotify->NotifyRLSrc, CFSTR(VBOX_IOKIT_MODE_STRING));
     505            CFRunLoopRef RunLoopRef = CFRunLoopGetCurrent();
     506            CFRetain(RunLoopRef); /* Workaround for crash when cleaning up the TLS / runloop((sub)mode). See #2807. */
     507            CFRunLoopAddSource(RunLoopRef, pNotify->NotifyRLSrc, CFSTR(VBOX_IOKIT_MODE_STRING));
    506508
    507509            /*
     
    540542                IOObjectRelease(pNotify->AttachIterator);
    541543            }
    542             CFRunLoopRemoveSource(CFRunLoopGetCurrent(), pNotify->NotifyRLSrc, CFSTR(VBOX_IOKIT_MODE_STRING));
     544            CFRunLoopRemoveSource(RunLoopRef, pNotify->NotifyRLSrc, CFSTR(VBOX_IOKIT_MODE_STRING));
    543545        }
    544546        IONotificationPortDestroy(pNotify->NotifyPort);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette