Граф коммитов

31393 Коммитов

Автор SHA1 Сообщение Дата
nobu 67edbe19ee gc.c: gc_stress is a VALUE
* gc.c (ruby_initial_gc_stress_ptr): now gc_stress is a VALUE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 16:01:16 +00:00
naruse 19a50877e6 Join the thread to collect zombies
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:59:41 +00:00
nobu a929da7135 test_signal.rb: use standard fds
* test/ruby/test_signal.rb (test_exit_action): use IO.popen and
  standard file descriptors instead of fd 3 and 4, which is not
  available on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:57:14 +00:00
nobu 98ca921088 test_signal.rb: use SIGINT if needed
* test/ruby/test_signal.rb (test_kill_immediately_before_termination):
  use SIGINT if SIGUSR1 is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:57:11 +00:00
nagachika 291c1bc314 * gc.c (gc_free_stored_bitmaps): fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:27:58 +00:00
nagachika 262cbfcd8c * ChangeLog: fix a typo for r41436.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:20:25 +00:00
svn 80e1345aa5 * 2013-06-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:06:31 +00:00
ko1 ce7c13ef4d * gc.c (RVALUE_PROMOTED): fix type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 15:06:27 +00:00
ko1 50214475a9 * gc.c (garbage_collect_test): rewrite checking code.
When RGENGC_CHECK_MODE >= 2, all minor marking, run normal minor
  marking *and* major/full marking. After that, compare the results
  and shows BUG if a object living with major/full marking but dead
  with minor marking.
  After detecting bugs, print references information.
  (RGENGC_CHECK_MODE == 2, show references to dead object)
  (RGENGC_CHECK_MODE == 3, show all references)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 14:59:35 +00:00
akr 24c9860d55 * bignum.c (bigfixize): Use rb_absint_size.
(check_shiftdown): Ditto.
  (big2ulong): Use bdigit_roomof.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 14:53:01 +00:00
ko1 745263abb9 * gc.c (RVALUE_PROMOTED): check consistency between oldgen flag and
oldgen bitmap if RGENGC_CHECK_MODE > 0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 14:34:11 +00:00
ko1 a1acb395a2 * gc.c (rb_gc_force_recycle): clear oldgen bitmap, too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 14:30:13 +00:00
xibbar e26fe81b0b * lib/cgi/util.rb(CGI.escapeHTML): performance improvement.
thank you @bbxiao1 via
  https://github.com/ruby/ruby/pull/333

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 12:42:05 +00:00
akr e82f5f7ddb * bignum.c (rb_uint2big): Consider environments BDIGIT is bigger than
long.
  (big2ulong): Ditto.
  (rb_big_aref): Ditto.
  (rb_big_pack): Just call rb_integer_pack.
  (rb_big_unpack): Just call rb_integer_unpack.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 12:19:10 +00:00
kazu 28945ea146 * gc.c (gc_stress_get): GC.stress can be Fixnum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 11:53:07 +00:00
akr 9cff4e30c6 * bignum.c (DIGSPERLONG): Don't define if BDIGIT is bigger than long.
(DIGSPERLL): Don't define if BDIGIT is bigger than LONG_LONG
  (rb_absint_size): Consider environments BDIGIT is bigger than long.
  Use BIGLO and BIGDN.
  (rb_absint_singlebit_p): Ditto.
  (rb_integer_pack): Ditto.
  (bigsub_int): Consider environments BDIGIT is bigger than long.
  Use SIZEOF_BDIGITS instead of sizeof(BDIGIT).
  (bigadd_int): Ditto.
  (bigand_int): Ditto.
  (bigor_int): Ditto.
  (bigxor_int): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 10:36:22 +00:00
nobu 9f473df72a test_pty.rb: reap zombie
* test/test_pty.rb (test_cloexec): reap zombie than leaving to
  detaching thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 09:17:23 +00:00
nobu b0f623f5f4 drbtest.rb: DRbBase
* test/drb/drbtest.rb (DRbBase): extract from DRbCore and DRbAry for
  setup_service and teardown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:38 +00:00
nobu 226fcd5814 test_sdbm.rb: open_db_child
* test/sdbm/test_sdbm.rb (TestSDBM#open_db_child): open the db in a
  child process and handshake using popen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:36 +00:00
nobu 7b253adc68 test_gdbm.rb: open_db_child
* test/gdbm/test_gdbm.rb (TestGDBM#open_db_child): open the db in a
  child process and handshake using popen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:33 +00:00
nobu 56fae61460 test_dbm.rb: no fork
* test/dbm/test_dbm.rb (have_fork?): no longer used already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:31 +00:00
nobu 96734f26e4 test_rinda.rb: no fork
* test/rinda/test_rinda.rb (have_fork?): no longer used already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:29 +00:00
nobu 689333a0ba test/testunit: reap zombie
* test/testunit/test_hideskip.rb (test_hideskip): reap zombie by
  reading with IO.popen instead of separated spawn and assert.

* test/testunit/test_redefinition.rb (test_redefinition): ditto.

* test/testunit/test_sorting.rb (test_sorting): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:26 +00:00
nobu c704bb3149 test_rinda.rb: reap zombie
* test/rinda/test_rinda.rb (test_take_bug_8215): reap zombie.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:24 +00:00
nobu 76a45efd38 test_gdbm.rb: reap zombie
* test/gdbm/test_gdbm.rb (TestGDBM#have_fork): reap zombie

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:22 +00:00
nobu bc1bfb6997 test_curses.rb: reap zombie
* test/test_curses.rb (TestCurses#run_curses): reap zombie, since
  PTY.spawn with block does not wait the sub process but just
  detaches.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:19 +00:00
nobu 4f95e22d9c test_io.rb: use assert_separately
* test/ruby/test_io.rb (test_cross_thread_close_stdio): use
  assert_separately instead of separated fork and assert.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:17 +00:00
nobu ef7bd1b167 test_signal.rb: use assert_in_out_err
* test/ruby/test_signal.rb (test_kill_immediately_before_termination):
  use assert_in_out_err instead of separated fork and assert.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:15 +00:00
nobu 4835230fef test/ruby: reap zombies
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:12 +00:00
nobu c4561c2934 envutil.rb: reap zombies
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): reap zombies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:10 +00:00
nobu 058e6894bf test/runner.rb: reap zombies
* test/runner.rb (Test::Unit::ZombieHunter#after_teardown): reap zombies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:07 +00:00
ko1 9b47ec04a8 * include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add
rb_data_type_struct::flags. Now, this flags is passed
  at T_DATA object creation. You can specify FL_WB_PROTECTED
  on this flag.
* iseq.c: making non-shady iseq objects.
* class.c, compile.c, proc.c, vm.c: add WB for iseq objects.
* vm_core.h, iseq.h: constify fields to detect WB insertion.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 06:26:01 +00:00
nobu 063d4e4141 test_signal.rb: extra quotes
* test/ruby/test_signal.rb (TestSignal#test_signal_process_group):
  remove extra quotes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 06:14:15 +00:00
nobu 541bdd29ba gc.c: more info
* gc.c (gc_mark_children): show more info for broken object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 06:11:15 +00:00
kazu 0d736fb729 * test/ruby/envutil.rb (EnvUtil#rubybin): remove unnecessary unless expression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 05:07:28 +00:00
kazu 267691bc90 fix indent and style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 01:44:10 +00:00
ko1 97dd259df5 * gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:49:19 +00:00
ko1 bfac961bed * gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:45:41 +00:00
ko1 d879849b6e * gc.c (make_deferred): clear flags to T_ZOMBIE.
* gc.c (slot_sweep_body): fix indent.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:26:57 +00:00
akr 0393a91926 * bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
BDIGIT is 16bit.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:20:22 +00:00
ko1 54d04073d7 * gc.c (rgengc_remember): fix output level.
* gc.c (rgengc_rememberset_mark): fix to output clear count.
  (shady_object_count + clear_count = count of remembered objects)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:12:39 +00:00
ko1 65791846a6 * gc.c (rgengc_remember): check T_NONE and T_ZOMBIE
if RGENGC_CHECK_MODE > 0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:07:09 +00:00
ko1 5455b7e72e * gc.c (RGENGC_CHECK_MODE): add new check mode `3'.
In this mode, show all references if there is
  a miss-corrected object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:04:30 +00:00
ko1 81ed2d3c4a * gc.c (gc_stress_set): add special option of GC.stress.
`GC.stress=(flag)' accepts integer to control behavior of GC.
  See code for details. Of course, this feature is only for MRI.
  You can debug RGenGC (WB) using `GC.stress = 1'.
  Using this option, do minor marking at all possible places.
  GC::STRESS_MINOR_MARK = 1 and GC::STRESS_LAZY_SWEEP = 2
  seem good to add.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 21:35:40 +00:00
ko1 5a70af1d59 * vm.c (kwmerge_i): add WB.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 21:30:42 +00:00
ko1 0f1df31bdf * hash.c: `st_update()' also has same issue of last fix.
write barriers at callback function are too early.
  All write barriers are executed after `st_update()'



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 21:29:30 +00:00
svn 059f5df217 * 2013-06-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 19:50:49 +00:00
ko1 67d6aaca35 * variable.c (rb_const_set): fix WB miss.
WBs had located before creating reference between a klass
  and constant value. It causes GC bug.

    # pseudo code:
    WB(klass, value); # WB and remember klass
    st_insert(klass->const_table, const_id, value);

  `st_insert()' can cause GC before inserting `value' and
  forget `klass' from the remember set. After that, relationship
  between `klass' and `value' are created with constant table.
  Now, `value' can be young (shady) object and `klass' can be old
  object, without remembering `klass' object.
  At the next GC, old `klass' object will be skipped and
  young (shady) `value' will be miss-collected. -> GC bug

  Lesson: The place of a WB is important.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 19:50:44 +00:00
tarui 81568a297b * gc.c (gc_profile_record_flag): There may be two or more reasons. so, it was typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 14:02:58 +00:00
charliesome 65dc35a582 * vm_insnhelper.c (vm_call_method): ensure methods of type
VM_METHOD_TYPE_ATTR_SET are called with 1 argument

* test/ruby/test_module.rb (class TestModule): add test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 14:01:32 +00:00