summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-04 01:20:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-04 01:20:51 +0000
commitd55db6b999396639b660c25a8680bcb984db878f (patch)
tree58af38aca9f76e68ee11d008cf95bedf9bf3bac9 /ext/socket/socket.c
parent5a571ee064e26b73121359e4b52590a5c21be331 (diff)
* gc.c (gc_mark): enable GC stack checking.
* string.c (str_gsub): lock strings temporarily. [ruby-dev:24687] * ext/socket/socket.c (s_recvfrom): tmplock input buffer. [ruby-dev:24705] * array.c (rb_ary_uniq_bang): do not push frozen string from hash table. [ruby-dev:24695] * array.c (rb_ary_and): ditto. * array.c (rb_ary_or): ditto. * ext/enumerator/enumerator.c (each_cons_i): pass copy of an internal consequent array. [ruby-talk:118691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 624ea9f2a6a..1df7cb988c2 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -436,10 +436,12 @@ s_recvfrom(sock, argc, argv, from)
str = rb_tainted_str_new(0, buflen);
retry:
+ rb_str_locktmp(str);
rb_thread_wait_fd(fd);
TRAP_BEG;
slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
TRAP_END;
+ rb_str_unlocktmp(str);
if (slen < 0) {
if (rb_io_wait_readable(fd)) {