Project

General

Profile

Actions

Bug #2719

closed

Segfault during multiple calls to C embedded Ruby interpreter through dlopen

Added by marchaland (David MARCHALAND) about 14 years ago. Updated almost 13 years ago.

Status:
Rejected
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 1 (0 open1 closed)

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

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

Actions #2

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

Actions

Also available in: Atom PDF

Like0
Like0Like0