From 38d2bcd952d9768d0a920facb8d5660f6daf5ca2 Mon Sep 17 00:00:00 2001 From: knu Date: Mon, 23 Mar 2009 12:45:23 +0000 Subject: * ext/dbm/dbm.c (fdbm_initialize): Make the file variable volatile, because FilePathValue() currently does not protect the given variable from GC. (Probably it should) * ext/sdbm/init.c (fsdbm_initialize): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/dbm/dbm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/dbm') diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c index 7a78f8dad0..84d331ae53 100644 --- a/ext/dbm/dbm.c +++ b/ext/dbm/dbm.c @@ -91,7 +91,8 @@ fdbm_alloc(VALUE klass) static VALUE fdbm_initialize(int argc, VALUE *argv, VALUE obj) { - VALUE file, vmode, vflags; + volatile VALUE file; + VALUE vmode, vflags; DBM *dbm; struct dbmdata *dbmp; int mode, flags = 0; -- cgit v1.2.3