# Issue during multiple calls to C embedded Ruby with dlopen

**URL:** <https://www.ruby-forum.com/t/issue-during-multiple-calls-to-c-embedded-ruby-with-dlopen/183074>\
**Category:** Ruby\
**Created:** [February 7, 2010, 3:40pm UTC](https://www.ruby-forum.com/t/issue-during-multiple-calls-to-c-embedded-ruby-with-dlopen/183074 "2010-02-07T15:40:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [February 7, 2010, 3:40pm UTC](https://www.ruby-forum.com/t/issue-during-multiple-calls-to-c-embedded-ruby-with-dlopen/183074/1 "2010-02-07T15:40:20Z")

</div>

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 and have the same behavior (ie segfault) with Ruby  
1.9.1.

Thanks for your consideration,  
David
