Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455284 - dev-libs/expat-2.1.0-r2: app-emulation/emul-linux-x86-baselibs-20121202 - /opt/googleearth/googleearth-bin segfaults in /usr/lib32/libexpat.so.1
Summary: dev-libs/expat-2.1.0-r2: app-emulation/emul-linux-x86-baselibs-20121202 - /op...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://bugzilla.novell.com/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks: 455124
  Show dependency tree
 
Reported: 2013-02-03 14:25 UTC by Tom Wijsman (TomWij) (RETIRED)
Modified: 2015-06-02 08:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-03 14:25:11 UTC
When fontconfig is configured with

> eselect fontconfig enable 65-fonts-persian.conf

starting Google Earth (/opt/googleearth/googleearth-bin) will result in a segfault, as a temporary workaround people can then disable this to get Google Earth to start. This appears to happen in expat (/usr/lib32/libexpat.so.1):

> /usr/lib32/libexpat.so.1(XML_ParseBuffer+0x83)[0xf3ce78a3]
> /usr/lib32/libfontconfig.so.1(FcConfigParseAndLoad+0x1eb)[0xf67e36db]
> /usr/lib32/libfontconfig.so.1(FcInitLoadConfig+0x42)[0xf67d85f2]
> /usr/lib32/libfontconfig.so.1(FcInitLoadConfigAndFonts+0xc)[0xf67d870c]
> /usr/lib32/libfontconfig.so.1(FcInit+0x2d)[0xf67d897d]
> ./libQtGui.so.4(_Z7qt_initP19QApplicationPrivateiP9_XDisplaymm+0x1fff)[0xf6b8502f]

The full stack trace and information is available at bug #455124.

From the information found at Novell's bugzilla (see URL field, c15) we yield

> The segfault was traced down to reading one of the XML font files and the "culprit" was libexpat. The remedy was to rebuild expat-2.1.0.tar.gz with -Bsymbolic-functions passed along to the linker: LDFLAGS='-Wl,-Bsymbolic-functions' ./configure --prefix=/usr && make && make
install

which is the first possible fix.

openSUSE fixes this at https://build.opensuse.org/request/show/148919 with

> really hide private Xml* symbols

which basically uses -fvisibility=hidden to hide all symbols and explicitly name exported symbols (__attribute__ ((visibility ("default")))), this is the second possible fix.

In c19 we see the possible cause stated:

> I think the problem are Xml* symbols exported in libexpat1 and libbase
libraries.
> ...
> libexpat and libbase libraries exports XML_* functions and EarthXML_*
respectively which can't clash thanks to Earth prefix. But prefixing Xml*
functions is forgotten. Maybe because, according to expat.h they are not meant
to be exported and should be hidden.

Can you look into this?
Comment 1 Pacho Ramos gentoo-dev 2013-02-03 14:43:59 UTC
This needs to be fixed in expat at first
Comment 2 Julian Ospald 2013-02-03 15:02:34 UTC
the suse visibility patch is here
https://build.opensuse.org/package/view_file?expand=1&file=expat-visibility.patch&package=expat&project=openSUSE%3AFactory

and would require eautoreconf
Comment 3 Julian Ospald 2013-02-03 17:10:51 UTC
I have built expat with that suse patch in a 32bit chroot and used those libs instead of the app-emulation/emul-linux-x86-baselibs ones.

I can confirm that it fixes the problem.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-06-02 08:33:41 UTC
The emul-linux-x86 packages have been removed.