Bug #2719
closedSegfault during multiple calls to C embedded Ruby interpreter through dlopen
Description
=begin
Hi,
I try to embed a Ruby interpreter into an application through a shared library. This application can call more than one time Ruby interpreter. In the attached testcase, first call works as expected but next calls create a segmentation fault.
Any idea of what is wrong in my code or is it really a Ruby bug? I use Ruby 1.8.7-p248.
Thanks for your consideration,
David
=end
Files
Updated by marchaland (David MARCHALAND) about 14 years ago
=begin
Well, I idenfitied that this bug is due to an unexpected behavior with dlclose().
My question is : why require 'fileutils' for instance do not allow dlclose() to close immediatly libruby.so and waits for end of program execution? Is there a way to unload libraries loaded by require?
Regards,
David
=end
Updated by naruse (Yui NARUSE) about 14 years ago
- Status changed from Open to Rejected
=begin
why require 'fileutils' for instance do not allow dlclose() to close immediatly libruby.so and waits for end of program execution?
That's because we don't need.
Is there a way to unload libraries loaded by require?
You can know loaded library files by get_loaded_features().
=end