mirror of
https://github.com/anope/anope.git
synced 2026-07-03 13:03:14 +02:00
Use RTLD_NOW when loading modules to resolve all symbols immediately.
This prevents modules with unresolved symbols from loading instead of loading and crashing later.
This commit is contained in:
@@ -149,7 +149,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
|
||||
}
|
||||
|
||||
dlerror();
|
||||
void *handle = dlopen(pbuf.c_str(), RTLD_LAZY);
|
||||
void *handle = dlopen(pbuf.c_str(), RTLD_NOW);
|
||||
const char *err = dlerror();
|
||||
if (!handle && err && *err)
|
||||
{
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#define RTLD_LAZY 0
|
||||
#define RTLD_NOW 0
|
||||
|
||||
extern void *dlopen(const char *filename, int);
|
||||
extern char *dlerror(void);
|
||||
|
||||
Reference in New Issue
Block a user