Created attachment 173365 [details] Patch adding visibility to C++ exceptions See also upstream report http://tickets.musicbrainz.org/browse/LMB-43 Applications using libkcddb crash when libmusicbrainz5 throws an error while looking up the CD info (e.g. connection error, or unknown CD). The problem is that libmusicbrainz5 throws a (C++) exception. libkcddb catches those exceptions and returns an error code instead. But with -fvisibility=hidden (the default in compiling KDE code), the exception symbols are hidden, libkcddb can't catch the exceptions and they propagate to the calling application, which gets an unexpected exception and crashes. The nicest place to patch this is in libmusicbrainz5, to ensure that the exception symbols are always visible (so that libkcddb and possibly other users of libmusicbrainz5 can catch the exceptions reliably). The attached patch adds a visibility-attribute to the exception symbols, and prevents crashes that have been reported against KDE applications on FreeBSD (e.g. PR 209696).
Created attachment 173379 [details] Patch against portstree This patch applies directly to the ports tree: - adds the previous patch to audio/libmusicbrainz5/files/ - bumps PORTREVISION, since new symbols are now strongly defined (in particular, to force libkcddb to rebuild)
A commit references this bug: Author: jhale Date: Mon Sep 19 23:19:00 UTC 2016 New revision: 422468 URL: https://svnweb.freebsd.org/changeset/ports/422468 Log: Add visibility to C++ exceptions to prevent crashes with applications using libkcddb. PR: 211630 Submitted by: Adriaan de Groot <groot@kde.org> Changes: head/audio/libmusicbrainz5/Makefile head/audio/libmusicbrainz5/files/patch-musicbrainz5-httpfetch-h.patch
Committed, thanks!