[Gambas-devel] Curious error (gbi)

Benoit Minisini gambas at ...1...
Tue Mar 9 22:07:37 CET 2004


On Sunday 07 March 2004 09:51, Daniel Campos wrote:
> Hello:
>
> When you try to extract symbols from a non-existing library, for example
> you want to do :
>
> gbi gb.net
>
> but you type it wrongly:
>
> gbi gb.neto
>
> A segmentation fault happens. I've look at the code, in gbi.c, and all
> seems to be OK:
>
> ...
>   lib = lt_dlopenext(path);
>
>   if (!lib)
>     error2(path, lt_dlerror());
>
>   desc = lt_dlsym(lib, LIB_CLASS);
> ...
>
> However, libtool does not return NULL in lt_dlopenext as it should do,
> as 'gb.neto' does not exists, but a handle to ..what?, so, when calling
> to lt_dlsym the program crashes.
>
> Currently I'm using libtool-1.4.3 from Mandrake cooker, and the previous
> version from Mandrake 9.2 has the same problem...is it a bug from
> libtool, or something I can no see?
>
> Regards,

I added a test on the file existence before calling lt_dlopenext. This will 
fix the crash.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list