1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2003-10-13 17:29:34 +00:00
parent b2de95d4af
commit e7257aa72e
2 changed files with 8 additions and 7 deletions

View file

@ -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>

9
eval.c
View file

@ -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);