summaryrefslogtreecommitdiff
path: root/ruby/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2016-03-16 14:52:46 -0700
committerMark Spruiell <mes@zeroc.com>2016-03-16 14:52:46 -0700
commitdf8f94961365deaabf9a5bd454497371e1a7ef01 (patch)
tree8b42ae24e9911955b7568bfd445eddae1e5703f2 /ruby/src
parentICE-7023 - Ruby 2.3 compatibility (diff)
downloadice-df8f94961365deaabf9a5bd454497371e1a7ef01.tar.bz2
ice-df8f94961365deaabf9a5bd454497371e1a7ef01.tar.xz
ice-df8f94961365deaabf9a5bd454497371e1a7ef01.zip
fixing recursive lock bug in ruby extension
Diffstat (limited to 'ruby/src')
-rw-r--r--ruby/src/IceRuby/ValueFactoryManager.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/ruby/src/IceRuby/ValueFactoryManager.cpp b/ruby/src/IceRuby/ValueFactoryManager.cpp
index 649d435f29d..562526c0003 100644
--- a/ruby/src/IceRuby/ValueFactoryManager.cpp
+++ b/ruby/src/IceRuby/ValueFactoryManager.cpp
@@ -192,11 +192,17 @@ IceRuby::ValueFactoryManager::mark()
void
IceRuby::ValueFactoryManager::markSelf()
{
- Lock lock(*this);
+ volatile VALUE self;
+
+ {
+ Lock lock(*this);
+
+ self = _self;
+ }
- if(!NIL_P(_self))
+ if(!NIL_P(self))
{
- rb_gc_mark(_self);
+ rb_gc_mark(self);
}
}