On Sun, Dec 28, 2008 at 03:26:18PM +0100, Kurt Roeckx wrote:
> On Sun, Dec 28, 2008 at 10:02:30PM +0800, Kaiwang Chen wrote:
>
> > The problem is lt_dlopenext() doesn't try to locate a .so file in my Debian
> > testing
> > distribution. I installed both libltdl3 and libltdl3-dev.
> >
> > In the example of section 18.2.3 of autobook, the example on the page(
> > http://sources.redhat.com/autobook/autobook/autobook_169.html#SEC169) can
> > be run by
> >
> > $ MODULE_PATH=`pwd` ltdl-loader simple-module.so World
> > Hello, world!
> > => 0
> >
> > It should be also able to run like this (notice the .so suffix is omited)
> > according to
> > documentation of dl_openext() on the above page:
> >
> > $ MODULE_PATH=`pwd` ltdl-loader simple-module World
> > Segmentation fault
There seem to be 2 problems:
- lt_dlerror() returns a "file not found" error, while the call
was succesful. It looks like ltdl shouldn't have returned
that error. Not sure how easy that is to fix.
- In case of an error, ltdl-loader example closes the library
again but goes on and then tries to use a now invalid pointer.
The ltdl-loader does:
errors = lt_dlclose (module);
module = NULL;
And it should probably set errors to something != 0 there.
The lt_dlclose will probably always be succesful.
Kurt
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]