Loading dynamic modules with unresolved symbols exits pike
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=525
Reported by David Hedbor, Idonex / Real Networks david@hedbor.org
When loading a .so file which has unresolved symbols, Pike exits. This is due to how RTLD_LAZY works in Linux. The problem is fixed in Pike 7.1
Here's a patch:
Index: dynamic_load.c
===================================================================
RCS file: /cvs/Pike/7.0/src/dynamic_load.c,v
retrieving revision 1.39
diff -u -r1.39 dynamic_load.c
--- dynamic_load.c 2000/02/17 18:58:16 1.39
+++ dynamic_load.c 2000/10/11 22:53:17
@@ -255,8 +255,7 @@
module_name = sp[-args].u.string->str;
/* Removing RTLD_GLOBAL breaks some PiGTK themes - Hubbe */
- module=dlopen(module_name,
- (d_flag ? RTLD_NOW : RTLD_LAZY) |RTLD_GLOBAL );
+ module=dlopen(module_name, RTLD_NOW |RTLD_GLOBAL);
if(!module) {