зеркало из https://github.com/mozilla/gecko-dev.git
6a956c6f97
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 |
||
---|---|---|
.. | ||
compat | ||
compat-gtk3/gtk | ||
crashtests | ||
mozgtk | ||
IMContextWrapper.cpp | ||
IMContextWrapper.h | ||
NativeKeyBindings.cpp | ||
NativeKeyBindings.h | ||
WakeLockListener.cpp | ||
WakeLockListener.h | ||
WidgetTraceEvent.cpp | ||
gtk2drawing.c | ||
gtk3drawing.c | ||
gtkdrawing.h | ||
maiRedundantObjectFactory.c | ||
maiRedundantObjectFactory.h | ||
moz.build | ||
mozcontainer.c | ||
mozcontainer.h | ||
nsAppShell.cpp | ||
nsAppShell.h | ||
nsApplicationChooser.cpp | ||
nsApplicationChooser.h | ||
nsBidiKeyboard.cpp | ||
nsBidiKeyboard.h | ||
nsCUPSShim.cpp | ||
nsCUPSShim.h | ||
nsClipboard.cpp | ||
nsClipboard.h | ||
nsColorPicker.cpp | ||
nsColorPicker.h | ||
nsDeviceContextSpecG.cpp | ||
nsDeviceContextSpecG.h | ||
nsDragService.cpp | ||
nsDragService.h | ||
nsFilePicker.cpp | ||
nsFilePicker.h | ||
nsGTKToolkit.h | ||
nsGtkCursors.h | ||
nsGtkKeyUtils.cpp | ||
nsGtkKeyUtils.h | ||
nsGtkUtils.h | ||
nsIImageToPixbuf.h | ||
nsIdleServiceGTK.cpp | ||
nsIdleServiceGTK.h | ||
nsImageToPixbuf.cpp | ||
nsImageToPixbuf.h | ||
nsLookAndFeel.cpp | ||
nsLookAndFeel.h | ||
nsNativeThemeGTK.cpp | ||
nsNativeThemeGTK.h | ||
nsPSPrinters.cpp | ||
nsPSPrinters.h | ||
nsPaperPS.cpp | ||
nsPaperPS.h | ||
nsPrintDialogGTK.cpp | ||
nsPrintDialogGTK.h | ||
nsPrintOptionsGTK.cpp | ||
nsPrintOptionsGTK.h | ||
nsPrintSettingsGTK.cpp | ||
nsPrintSettingsGTK.h | ||
nsScreenGtk.cpp | ||
nsScreenGtk.h | ||
nsScreenManagerGtk.cpp | ||
nsScreenManagerGtk.h | ||
nsSound.cpp | ||
nsSound.h | ||
nsToolkit.cpp | ||
nsWidgetFactory.cpp | ||
nsWindow.cpp | ||
nsWindow.h |