glib / Tru64 v.5.0 interaction bug report & workaround
- From: jhbrown ai mit edu (Jeremy H. Brown)
- To: gnome-list gnome org
- Cc: jhbrown ai mit edu
- Subject: glib / Tru64 v.5.0 interaction bug report & workaround
- Date: 01 Feb 2001 23:16:43 -0500
Package: glib
Version: 1.2.8
Platform: Alpha/Compaq Tru64 UNIX v. 5.0 (alphaev56-dec-osf5.0)
------
Preface:
I'm told that while bugs.gnome.org is melted down, this is the right
list to which to send a bug report. If this is incorrect, please
accept my apology-in-advance, and gently guide me in the right
direction.
------
Bug manifestation:
Attempting to start gimp on this platform causes it to fail:
LibGimp-WARNING **: script-fu: wire_read: unexpected EOF
Illegal instruction (core dumped)
------
Related bugs:
Back before bugs.gnome.org went offline, I seem to recall seeing this
listed as a critical bug, as it makes gimp unusable on this platform.
Unfortunately, I don't have a reference number for that bug.
------
Bug analysis:
Digging around with gdb, I learned that the precipitating error was
actually a SIGILL during the loading of the libcolorsel_gtk.so module
-- in fact, when the modules's module_init function was called.
Eventually I figured out that the _g_module_symbol routine in
glib-1.2.8/gmodule/gmodule-dl.c was getting a bogus address for
module_init from dlsym -- specifically, it was getting the address of
a slot in the gimp executable's .sbss section named module_init,
rather than the module_init defined libcolorsel_gtk.so.
------
Bug workaround:
I experimentally determined that removing the RTLD_GLOBAL flag from
the call to dlopen at line 89 of glib-1.2.8/gmodule/gmodule-dl.c
caused dlsym to start returning a pointer to the correct version of
module_init. Since earlier comments in the file say that RTLD_GLOBAL
is optional anyhow, this seemed like an acceptable workaround. (A
real packaging of this would probably want to simply re-define
RTLD_GLOBAL to 0 when configure figures out that the OS is Tru64.)
Just for fun I also played with using RTLD_LOCAL -- the bug occurs
then, too; only leaving both flags out of the dlopen call causes dlsym
to behave properly. I assume this is a bug in the implementation of
dlopen/dlsym, but I don't have a formal spec to check against to be
certain.
As a final note: version 4.0D of this operating system (known then as
Digital UNIX rather than Tru64) doesn't define the RTLD_GLOBAL /
RTLD_LOCAL flags, and it correspondingly doesn't suffer from this
problem.
Please feel free to contact me for more information.
Jeremy
jhbrown ai mit edu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]