[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Segfault in libltdl

From: Kai Sterker
Subject: Segfault in libltdl
Date: Fri, 22 May 2009 14:44:12 +0200

The program I am working on is composed of a number of shared
libraries and Python modules. I recently updated the build to use
-no-undefined, to ensure that each library and Python module would
have all required dependencies linked in. All is working well on
MacOSX and I even got the build working on Windows, so I assumed no
problems on Linux. However, a user reported segfaults when trying to
run some of the included Python scripts. So I tried for myself on
Ubuntu 9.04 and found that the segfault originates in libltdl.

The program does not include libltdl, instead it has the following
line in its autogen.sh script:

libtoolize --force --copy --ltdl

On this system, libtoolize --version is

"libtoolize (GNU libtool) 2.2.6"

I have since compiled it with the -DLT_DEBUG_LOADERS flag and get the
following output:

address@hidden:~/adonthell/adonthell-build$ python
try_dlopen (/usr/local/lib/adonthell/main/_sdl, .la)
tryall_dlopen (_sdl.a, (ALL))
Calling (null)->module_open (_sdl.a)
Segmentation fault

In the debugger I get:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fb8e44866f0 (LWP 10342)]
0x00007fb8e2e0b781 in tryall_dlopen (phandle=0x7fffec49bac0,
    filename=0x1049590 "_sdl.a", advise=0x104a730, vtable=0x0)
    at ../../adonthell/libltdl/ltdl.c:434
434             handle->module = (*loader_vtable->module_open)
(gdb) bt
#0  0x00007fb8e2e0b781 in tryall_dlopen (phandle=0x7fffec49bac0,
    filename=0x1049590 "_sdl.a", advise=0x104a730, vtable=0x0)
    at ../../adonthell/libltdl/ltdl.c:434
#1  0x00007fb8e2e0bb2f in find_module (handle=0x7fffec49bac0,
    dir=0x1049ea0 "/usr/local/lib/adonthell/main/",
    libdir=0x105c570 "/usr/local/lib/adonthell/main",
    dlname=0x104a710 "_sdl.so", old_name=0x1049590 "_sdl.a", installed=1,
    advise=0x104a730) at ../../adonthell/libltdl/ltdl.c:532
#2  0x00007fb8e2e0d392 in try_dlopen (phandle=0x7fffec49bb40,
    filename=0x1048738 "/usr/local/lib/adonthell/main/_sdl",
    ext=0x104ee92 ".la", advise=0x104a730)
    at ../../adonthell/libltdl/ltdl.c:1390
#3  0x00007fb8e2e0dc24 in lt_dlopenadvise (
    filename=0x1048738 "/usr/local/lib/adonthell/main/_sdl", advise=0x104a730)
    at ../../adonthell/libltdl/ltdl.c:1641
#4  0x00007fb8e2e0db12 in lt_dlopenext (
    filename=0x1048738 "/usr/local/lib/adonthell/main/_sdl")
    at ../../adonthell/libltdl/ltdl.c:1605
#5  0x00007fb8e2e09208 in base::get_module (address@hidden)
    at ../../../adonthell/src/base/paths.cc:67
#6  0x00007fb8e18a9f2c in adonthell::app::init (this=0x101e650)
    at ../../../adonthell/src/main/adonthell.cc:225
#7  0x00007fb8e1aade0b in AdonthellApp::init (this=0x101e650, main_func=0x1,

What's weird is that the same modules work fine when used from a C++
program instead of a Python script. Any idea what is wrong here? Could
there be a problem with my modules that causes libltdl to crash? Or is
it a problem in libltdl itself? Any further information I should


P.S: I'll attach _sdl.la in case that holds additional clues

P.P.S: The program in question is
http://savannah.nongnu.org/projects/adonthell in case you'd like to
reproduce the issue. Get the module "adonthell" from CVS, install it
and run any of the python scripts in the test directory.

Attachment: _sdl.la
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]