Project

General

Profile

Bug #2719

Segfault during multiple calls to C embedded Ruby interpreter through dlopen

Added by marchaland (David MARCHALAND) over 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
ruby -v:
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]
[ruby-core:28095]

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

testcase.txt (2.17 KB) testcase.txt marchaland (David MARCHALAND), 02/07/2010 11:50 PM

Related issues

Has duplicate Backport191 - Feature #2720: Segfault during multiple calls to C embedded Ruby wrapped with dl libraryRejected02/08/2010Actions

History

#1

Updated by marchaland (David MARCHALAND) over 9 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

#2

Updated by naruse (Yui NARUSE) over 9 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

Also available in: Atom PDF