Hi Gareth, I don't recall this being an issue before. What hardware, OS and OSG/osgEarth versions are you using?
Robert. On 21 September 2015 at 11:15, Gareth Francis <[email protected]> wrote: > > I believe I found a bug in getLibraryHandle. > > This was encountered when writing an osgEarth application, using the > osgEarthQt widgets (Qt 4.8.6). > > A segfault was encountered shortly after starting the application, when > pressing 's' (To bring up the standard set of rendering stats). > > I traced this to the dlopen( localLibraryName.c_str(), RTLD_LAZY | > RTLD_GLOBAL) call in osg/src/osgDB/DynamicLibrary.cpp > > According to the dlopen manpage: > > As at glibc 2.21, specifying the *RTLD_GLOBAL *flag when calling > *dlmopen*() generates an error. Furthermore, specifying *RTLD_GLOBAL* > when calling *dlopen*() results in a program crash (*SIGSEGV*) if the > call is made from any object loaded in a namespace other than the > initial namespace. > > > Changing osg to use RTLD_LOCAL avoids the crash, and doesn't seem to break > anything else as far as I can tell. > > Is there a specific reason why RTLD_GLOBAL is used? This doesn't make much > sense given the plugin architecture.. > > > I've attached a minimal patch including the fix. > > > Thanks > Gareth Francis > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

