[#79440] [Ruby trunk Bug#13188] Reinitialize Ruby VM. — shyouhei@...
Issue #13188 has been updated by Shyouhei Urabe.
6 messages
2017/02/06
[#79441] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.
— SASADA Koichi <ko1@...>
2017/02/06
On 2017/02/06 10:10, shyouhei@ruby-lang.org wrote:
[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>
Hi,
15 messages
2017/02/15
[#79541] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/15
Em 15-02-2017 05:05, Daniel Ferreira escreveu:
[#79543] Re: Immutable Strings vs Symbols
— Daniel Ferreira <subtileos@...>
2017/02/16
Hi Rodrigo,
[#79560] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/16
Em 15-02-2017 22:39, Daniel Ferreira escreveu:
[ruby-core:79534] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
From:
Nobuyoshi Nakada <nobu@...>
Date:
2017-02-15 07:27:55 UTC
List:
ruby-core #79534
On 2017/02/13 19:05, Nobuyoshi Nakada wrote:
>> But in marshal.c, I think we can use klass==0 to hide the object
>> and use rb_gc_force_recycle, instead. AFAIK,
>> rb_gc_force_recycle is safe if the object has klass==0 for its
>> entire lifetime.
>>
>> How about the following?
>
> Seems nice.
Sorry, I missed that `arg` may be dereferenced in `check_dump_arg()`
in the case continuation is used. Hiding wrapper objects is fine, but
freeing `arg` and recycling `wrapper` causes a dangling pointer and
can segfault on some environments, compilers and options, with the
following pacth.
```diff
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index bc22b5fd3a..bfc3f6df25 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -644,6 +644,9 @@
c = Bug9523.new
assert_raise_with_message(RuntimeError, /Marshal\.dump reentered at marshal_dump/) do
Marshal.dump(c)
+ GC.start
+ 1000.times {"x"*1000}
+ GC.start
c.cc.call
end
end
```
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>