diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-13 17:29:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-13 17:29:34 +0000 |
commit | e7257aa72e817601c033c256c1df388f2b03dcbc (patch) | |
tree | 05b647391451d84773ced27a633d33a1ab7cb771 | |
parent | b2de95d4afece89abd4ccf536295359f058c2043 (diff) | |
download | ruby-e7257aa72e817601c033c256c1df388f2b03dcbc.tar.gz |
* eval.c (rb_require_safe): segfault after loading .so.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 9 |
2 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,7 @@ +Tue Oct 14 02:29:31 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * eval.c (rb_require_safe): segfault after loading .so. + Tue Oct 14 02:05:23 2003 Akinori MUSHA <knu@iDaemons.org> * ext/Setup*, ext/enumerator/*: Add ext/enumerator, a helper @@ -20,8 +24,6 @@ Mon Oct 13 23:57:29 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> * intern.h: prototypes; rb_require_safe. -Mon Oct 13 23:57:29 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> - * test/runner.rb: accept non-option arguments. Mon Oct 13 20:49:51 2003 Yukihiro Matsumoto <matz@ruby-lang.org> @@ -6062,9 +6062,8 @@ rb_require_safe(fname, safe) ruby_safe_level = safe; found = search_required(fname, &feature, &path); if (found) { - ftptr = RSTRING(feature)->ptr; if (!path) { - load_wait(ftptr); + load_wait(RSTRING(feature)->ptr); result = Qfalse; } else { @@ -6077,9 +6076,9 @@ rb_require_safe(fname, safe) loading_tbl = st_init_strtable(); } /* partial state */ - st_insert(loading_tbl, - (st_data_t)(ftptr = ruby_strdup(ftptr)), - (st_data_t)curr_thread); + ftptr = ruby_strdup(RSTRING(feature)->ptr); + st_insert(loading_tbl, (st_data_t)ftptr, + (st_data_t)(mutex = rb_thread_mutex_new(Qtrue))); if (feature == fname && !OBJ_FROZEN(feature)) { feature = rb_str_dup(feature); OBJ_FREEZE(feature); |