[MacPorts] #44258: preventing a crash in the KWindowInfo::Private destructor
#44258: preventing a crash in the KWindowInfo::Private destructor --------------------------------------------+------------------------------ Reporter: rjvbertin@… | Owner: macports- Type: defect | tickets@… Priority: Normal | Status: new Component: ports | Milestone: Keywords: crash, NULL pointer, CFRelease | Version: 2.3.1 | Port: kdelibs4 --------------------------------------------+------------------------------ I came across a bug, as reported in my rekonq port submission: the snippet {{{ Q_FOREACH(const QWeakPointer<RekonqWindow> &pointer, wList) { if (KWindowInfo(pointer.data()->effectiveWinId(), NET::WMDesktop, 0).isOnCurrentDesktop()) return pointer.data(); } }}} will lead to calling CFRelease with a NULL argument in KWindowInfo::Private::~Private(). Cocoa allows sending a message (like `release`) to a nil object, but the CoreFoundation version CFRelease will crash when passed a NULL pointer. This is confirmed by the API documentation. Attached is a very simple patch that adds the required check before calling CFRelease - as is done all other times that function is called. -- Ticket URL: <https://trac.macports.org/ticket/44258> MacPorts <http://www.macports.org/> Ports system for OS X
#44258: kdelibs4: preventing a crash in the KWindowInfo::Private destructor --------------------------+---------------------- Reporter: rjvbertin@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: haspatch Port: kdelibs4 | --------------------------+---------------------- Changes (by ryandesign@…): * cc: nices@… (removed) * keywords: crash, NULL pointer, CFRelease => haspatch * owner: macports-tickets@… => nicos@… Comment: You should also attach a patch for the portfile. The portfile's revision would need to be increased. -- Ticket URL: <https://trac.macports.org/ticket/44258#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#44258: kdelibs4: preventing a crash in the KWindowInfo::Private destructor --------------------------+---------------------- Reporter: rjvbertin@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: haspatch Port: kdelibs4 | --------------------------+---------------------- Comment (by nicos@…): I am currently trying to clean up the various patches of kdelibs4, so I will surely consider this one when committing. However, considering the type of issue, it should really be reported upstream. -- Ticket URL: <https://trac.macports.org/ticket/44258#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#44258: kdelibs4: preventing a crash in the KWindowInfo::Private destructor --------------------------+---------------------- Reporter: rjvbertin@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: haspatch Port: kdelibs4 | --------------------------+---------------------- Comment (by rjvbertin@…):
I am currently trying to clean up the various patches of kdelibs4, so I will surely consider this one when committing. However, considering the type of issue, it should really be reported upstream.
Has been done, but against 4.13.x because it's still there. Patching older versions is probably up to those still using them as I doubt we'll see a 4.12.6 release! -- Ticket URL: <https://trac.macports.org/ticket/44258#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#44258: kdelibs4: preventing a crash in the KWindowInfo::Private destructor --------------------------+---------------------- Reporter: rjvbertin@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: haspatch Port: kdelibs4 | --------------------------+---------------------- Comment (by nicos@…): In that case, providing the link to ease tracking could prove useful: https://bugs.kde.org/show_bug.cgi?id=337154 -- Ticket URL: <https://trac.macports.org/ticket/44258#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#44258: kdelibs4: preventing a crash in the KWindowInfo::Private destructor --------------------------+---------------------- Reporter: rjvbertin@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: haspatch Port: kdelibs4 | --------------------------+---------------------- Changes (by mk@…): * cc: mk@… (added) * version: 2.3.1 => -- Ticket URL: <https://trac.macports.org/ticket/44258#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#44258: kdelibs4: preventing a crash in the KWindowInfo::Private destructor --------------------------+---------------------- Reporter: rjvbertin@… | Owner: nicos@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: haspatch Port: kdelibs4 | --------------------------+---------------------- Comment (by mk@…): BTW, on our [https://trac.macports.org/wiki/KDEProblems/KDETickets KDE ticket wiki page] we've listed this in section [https://trac.macports.org/wiki/KDEProblems/KDETickets#IssuesatKDEsbugtracker "Issues at KDE's bug tracker"] as an existing [https://bugs.kde.org/show_bug.cgi?id=334827 ticket at b.k.o. (334827)] which I have marked as a duplicate just now. -- Ticket URL: <https://trac.macports.org/ticket/44258#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#44258: kdelibs4: preventing a crash in the KWindowInfo::Private destructor --------------------------+---------------------- Reporter: rjvbertin@… | Owner: nicos@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: haspatch Port: kdelibs4 | --------------------------+---------------------- Changes (by nicos@…): * status: new => closed * resolution: => fixed Comment: Committed in r122038. Thanks for the submission. -- Ticket URL: <https://trac.macports.org/ticket/44258#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts