gecko/ipc
Mike Hommey 5cb6216446 Bug 1187533 - Change how Gtk+2 plugin-container is started on Gtk+3 builds. r=billm
The current situation looks like this: Firefox launches the plugin-container
with two environment variables set:
  LD_LIBRARY_PATH=$FIREFOX_DIR:$LD_LIBRARY_PATH
  LD_PRELOAD=$FIREFOX_DIR/libmozgtk2.so:$LD_PRELOAD

libxul.so has a dependency on libmozgtk.so (without "2"), but libmozgtk2.so
has a SONAME of libmozgtk.so, so ld.so recognizes libmozgtk2.so as a
dependency of libxul.so, and uses it instead of the actual libmozgtk.so,
making the plugin-container use Gtk+2 instead of Gtk+3 to load Gtk+2 plugins.

Now, ASan sets things up in shared libraries such that they needs a symbol
from the executable binary. So in the case of plugin-container, the
plugin-container executable itself contains some ASan symbols such as
__asan_init_v3. libmozgtk2.so, OTOH, contains an undefined weak reference to
that symbol, like all other Firefox shared libraries.

Since libmozgtk2.so is LD_PRELOADed, it is loaded _before_ the
plugin-container executable, and __asan_init_v3 can't be resolved.

Disabling ASan for libmozgtk2.so would be a possibility, but the build system
doesn't really know how to do that, and filtering out -fsanitize=address
can be fragile.

The alternative possibility, implemented here, is to change the library
loading strategy, renaming libmozgtk2.so to gtk2/libmozgtk.so, and setting
the following environment variable when Firefox launches the plugin-container:
  LD_LIBRARY_PATH=$FIREFOX_DIR/gtk2:$FIREFOX_DIR:$LD_LIBRARY_PATH
2015-07-28 08:19:13 +09:00
..
app Bug 1141693 - Build and use a PIE plugin-container on Android 5.0+. Based on a patch by Mike Hommey. r=me,glandium 2015-06-03 10:26:16 -05:00
chromium Bug 1178513 - Export libxul symbols needed by ACL. r=mattwoodrow 2015-07-02 15:19:35 -07:00
contentproc Bug 1151607 - Step 1: Add Linux sandboxing hook for when child processes are still single-threaded. r=kang r=bent 2015-04-10 18:05:19 -07:00
dbus Bug 1156632 - Remove unused forward class declarations - patch 4 - netwerk image and dom, r=ehsan 2015-04-22 08:29:20 +02:00
glue Bug 1187533 - Change how Gtk+2 plugin-container is started on Gtk+3 builds. r=billm 2015-07-28 08:19:13 +09:00
hal Bug 1187230: Generalize Bluetooth daemon runnables, r=shuang 2015-07-27 13:33:17 +02:00
ipdl Bug 1186025. Optimize the usage of regions. r=mstange 2015-07-21 10:54:44 -04:00
keystore Bug 1185478: Add leak checks to socket I/O classes 2015-07-21 08:06:29 +02:00
netd Bug 1182996 - Fix and add missing namespace comments. rs=ehsan 2015-07-13 08:25:42 -07:00
nfc Bug 1185478: Add leak checks to socket I/O classes 2015-07-21 08:06:29 +02:00
ril Bug 1185478: Add leak checks to socket I/O classes 2015-07-21 08:06:29 +02:00
testshell Bug 1177825 - Remove JSVAL_* constants. r=evilpie 2015-06-29 18:36:44 -07:00
unixfd Bug 1167210: Replace |union sockaddr_any| with |struct sockaddr_storage|, r=kmachulis 2015-05-27 13:49:07 +02:00
unixsocket Bug 1185478: Remove strong references from socket I/O class to socket classes 2015-07-21 08:06:29 +02:00
moz.build Bug 1171017: Move classes from ipc/bluetooth to ipc/hal, r=shuang 2015-06-15 14:44:03 +02:00
pull-chromium.py