Erik Hofman wrote:
> Unfortunately RTLD_DEFAULT isn't supported on all platforms (it isn't
> supported in IRIX anyhow). I think that if what you describe is the
> problem this really is a bug at your side. What happens is that the
> function pointer is copied to ftpr. So dlcose() should never be able to
> have any effects on this copy ??

I think the idea here is that dlclose() is unmapping the memory region
associated with the shared library.  The pointer still has the same
value, but there are no page table entries associated with that
address any more, so an instruction fetch from that address causes a
segmentation fault.

The meaning of dlclose() is "I don't need this library any more", not
"please close the handle, I have what I need".  Alex is right, this is
a bug, even if it doesn't cause crashes up on all platforms.  We
clearly don't want to unload the OpenGL library. :)


Flightgear-devel mailing list

Reply via email to