Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17960 - [bug] libtool 1.4.1-r10 return bogus lt_dlhandle to user...
Summary: [bug] libtool 1.4.1-r10 return bogus lt_dlhandle to user...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-21 17:08 UTC by Alberto Ornaghi
Modified: 2003-10-22 21:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
the test case... (test.tar.gz,2.42 KB, application/octet-stream)
2003-03-30 16:53 UTC, Alberto Ornaghi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Ornaghi 2003-03-21 17:08:01 UTC
if the lt_dlopen function fails, it does not return NULL...

this was fixed in libtool 1.4.3 (as reported in the changelog):

 2002-06-11  Daniel Kobras  <kobras@linux.de>
   
           * libltdl/ltdl.c (try_dlopen): Don't return bogus handle to user
             if tryall_dlopen() fails.

please unmask libtool 1.4.3 or add a patch to 1.4.1

(I can provide an example code to achieve the error)


Reproducible: Always
Steps to Reproduce:
1. create an executable from a source code containing:   handle =
lt_dlopen("non_existent_file");
2. the "handle" is not null as it should be.
3.

Actual Results:  
the program receives a segfault if it tries to lt_dlsym on that handle.

Expected Results:  
handle should be NULL if the lt_dlopen function fails.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-30 15:10:57 UTC
Please add the test case.
Comment 2 Alberto Ornaghi 2003-03-30 16:53:00 UTC
Created attachment 10041 [details]
the test case...

to test:

tar zxvf test.tar.gz
aclocal
libtoolize
autoheader
automake -a -c
autoconf
./configure
make
rm -Rf .libs
./loader

and you will get the segfault because the lt_dlopen cand find .libs/plugin1.so

bye
Comment 3 Joshua Kinard gentoo-dev 2003-10-22 21:21:16 UTC
According to my portage tree, libtool-1.4.3-r1 is marked stable, and libtool-1.4.3-r2
is unstable.  Then there is Bug #23071 which includes an ebuild for libtool-1.5
which I will likely add to portage and keyword mask until some people can
test it.  As such, resolving this bug as FIXED.