[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in libltdl?
From: |
Stephano Mariani |
Subject: |
Bug in libltdl? |
Date: |
Thu, 21 Mar 2002 00:08:36 -0000 |
libltdl (current from CVS) seems not to return NULL when lt_dlopen is
passed the name of a non-existent file. I have used:
void
sk_err ( char *e )
{
fprintf ( stderr, "Error: %s\n", e );
exit ( EXIT_FAILURE );
}
int
main ( int argc __attribute ( ( unused ) ),
char *const *argv __attribute ( ( unused ) ) )
{
lt_dlhandle mod = NULL;
if ( lt_dlinit ( ) )
{
sk_err ( "Init" );
}
/* LTDL_SET_PRELOADED_SYMBOLS(); */
if ( ( mod = lt_dlopen ( "non-existant.dll" ) ) == NULL )
{
sk_err ( "Open" );
}
if ( lt_dlclose ( mod ) )
{
sk_err ( "Close" );
}
if ( lt_dlexit ( ) )
{
sk_err ( "Exit" );
}
return 0;
}
I get a segfault on the lt_dlclose line since the module does not exist,
and yet lt_dlopen does not return NULL.
Please advise,
Thanks,
Stephano Mariani
- Bug in libltdl?,
Stephano Mariani <=