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.
Please add the test case.
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
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.