Permalink
Browse files

merge railsexpress patches, closes #1119

  • Loading branch information...
2 parents 336e0f3 + bcb075d commit c97e36d6dab232fd806f78fc6a1e9da41e3ccd44 @mpapis mpapis committed Sep 19, 2012
Showing with 3,724 additions and 95 deletions.
  1. +101 −0 patches/ruby/1.8.7/p370/railsexpress/01-ignore-generated-files.patch
  2. +139 −0 patches/ruby/1.8.7/p370/railsexpress/02-fix-tests-for-osx.patch
  3. +25 −0 patches/ruby/1.8.7/p370/railsexpress/03-sigvtalrm-fix.patch
  4. +1,875 −0 patches/ruby/1.8.7/p370/railsexpress/04-railsbench-gc-patch.patch
  5. +15 −0 patches/ruby/1.8.7/p370/railsexpress/05-display-full-stack-trace.patch
  6. +13 −0 patches/ruby/1.8.7/p370/railsexpress/06-better-source-file-tracing.patch
  7. +159 −0 patches/ruby/1.8.7/p370/railsexpress/07-heap-dump-support.patch
  8. +249 −0 patches/ruby/1.8.7/p370/railsexpress/08-fork-support-for-gc-logging.patch
  9. +120 −0 patches/ruby/1.8.7/p370/railsexpress/09-track-malloc-size.patch
  10. +111 −0 patches/ruby/1.8.7/p370/railsexpress/10-track-object-allocation.patch
  11. +70 −0 patches/ruby/1.8.7/p370/railsexpress/11-expose-heap-slots.patch
  12. +53 −0 patches/ruby/1.8.7/p370/railsexpress/12-fix-heap-size-growth-logic.patch
  13. +12 −0 patches/ruby/1.8.7/p370/railsexpress/13-heap-slot-size.patch
  14. +66 −0 patches/ruby/1.8.7/p370/railsexpress/14-add-trace-stats-enabled-methods.patch
  15. +52 −0 patches/ruby/1.8.7/p370/railsexpress/15-track-live-dataset-size.patch
  16. +51 −0 patches/ruby/1.8.7/p370/railsexpress/16-add-object-size-information-to-heap-dump.patch
  17. +229 −0 patches/ruby/1.8.7/p370/railsexpress/17-caller-for-all-threads.patch
  18. +26 −0 patches/ruby/1.8.7/p370/railsexpress/18-fix-zlib-deflate.patch
  19. +28 −0 patches/ruby/1.8.7/p370/railsexpress/19-fix-broken-seek-on-osx.patch
  20. +24 −0 patches/ruby/1.9.3/head/railsexpress/01-avoid-using-broken-ffi-headers.patch
  21. +0 −24 patches/ruby/1.9.3/head/railsexpress/01-revert-f6b49243eb0c21bea1c4198cdd52a549e6ead075.patch
  22. +0 −13 patches/ruby/1.9.3/head/railsexpress/02-backport-c2086cc7ff1142b14c95c.patch
  23. +2 −2 patches/ruby/1.9.3/head/railsexpress/{03-railsbench-gc.patch → 02-railsbench-gc.patch}
  24. 0 ...express/{04-display-more-detailed-stack-trace.patch → 03-display-more-detailed-stack-trace.patch}
  25. +1 −1 ...3/head/railsexpress/{05-fork-support-for-gc-logging.patch → 04-fork-support-for-gc-logging.patch}
  26. 0 ...uby/1.9.3/head/railsexpress/{06-track-live-dataset-size.patch → 05-track-live-dataset-size.patch}
  27. +13 −0 patches/ruby/1.9.3/head/railsexpress/06-webrick_204_304_keep_alive_fix.patch
  28. +84 −0 patches/ruby/1.9.3/head/railsexpress/07-export-a-few-more-symbols-for-ruby-prof.patch
  29. +13 −0 patches/ruby/1.9.3/p125/railsexpress/09-webrick_204_304_keep_alive_fix.patch
  30. +36 −43 patches/ruby/1.9.3/p194/railsexpress/03-railsbench-gc.patch
  31. +2 −2 patches/ruby/1.9.3/p194/railsexpress/05-fork-support-for-gc-logging.patch
  32. +4 −4 patches/ruby/1.9.3/p194/railsexpress/06-track-live-dataset-size.patch
  33. +13 −0 patches/ruby/1.9.3/p194/railsexpress/07-webrick_204_304_keep_alive_fix.patch
  34. +84 −0 patches/ruby/1.9.3/p194/railsexpress/08-export-a-few-more-symbols-for-ruby-prof.patch
  35. +24 −0 patches/ruby/1.9.3/p194/railsexpress/09-avoid-using-broken-ffi-headers.patch
  36. +19 −0 patchsets/ruby/1.8.7/p370/railsexpress
  37. +7 −6 patchsets/ruby/1.9.3/head/railsexpress
  38. +1 −0 patchsets/ruby/1.9.3/p125/railsexpress
  39. +3 −0 patchsets/ruby/1.9.3/p194/railsexpress
@@ -0,0 +1,101 @@
+diff --git a/.gitignore b/.gitignore
+new file mode 100644
+index 0000000..00c347a
+--- /dev/null
++++ b/.gitignore
+@@ -0,0 +1,95 @@
++.ext
++.installed.list
++.rbconfig.time
++Makefile
++autom4te.cache/
++config.h
++config.status
++configure
++ext/Win32API/Makefile
++ext/bigdecimal/Makefile
++ext/curses/Makefile
++ext/dbm/Makefile
++ext/digest/Makefile
++ext/digest/bubblebabble/Makefile
++ext/digest/md5/Makefile
++ext/digest/rmd160/Makefile
++ext/digest/sha1/Makefile
++ext/digest/sha2/Makefile
++ext/dl/Makefile
++ext/dl/call.func
++ext/dl/callback.func
++ext/dl/cbtable.func
++ext/dl/dlconfig.h
++ext/dl/dlconfig.rb
++ext/enumerator/Makefile
++ext/etc/Makefile
++ext/fcntl/Makefile
++ext/gdbm/Makefile
++ext/iconv/Makefile
++ext/io/wait/Makefile
++ext/nkf/Makefile
++ext/openssl/Makefile
++ext/openssl/extconf.h
++ext/pty/Makefile
++ext/racc/cparse/Makefile
++ext/readline/Makefile
++ext/sdbm/Makefile
++ext/socket/Makefile
++ext/stringio/Makefile
++ext/strscan/Makefile
++ext/syck/Makefile
++ext/syslog/Makefile
++ext/thread/Makefile
++ext/tk/Makefile
++ext/tk/tkutil/Makefile
++ext/win32ole/Makefile
++ext/win32ole/.document
++ext/zlib/Makefile
++largefile.h
++miniruby
++parse.c
++rbconfig.rb
++ruby
++enc.mk
++ext/bigdecimal/extconf.h
++ext/continuation/
++ext/coverage/
++ext/curses/extconf.h
++ext/dbm/extconf.h
++ext/digest/bubblebabble/extconf.h
++ext/digest/extconf.h
++ext/digest/md5/extconf.h
++ext/digest/rmd160/extconf.h
++ext/digest/sha1/extconf.h
++ext/digest/sha2/extconf.h
++ext/dl/callback.h
++ext/dl/extconf.h
++ext/etc/extconf.h
++ext/fcntl/extconf.h
++ext/fiber/
++ext/iconv/extconf.h
++ext/io/wait/extconf.h
++ext/json/
++ext/nkf/extconf.h
++ext/pty/extconf.h
++ext/racc/cparse/extconf.h
++ext/readline/extconf.h
++ext/ripper/
++ext/sdbm/extconf.h
++ext/socket/constants.h
++ext/socket/extconf.h
++ext/stringio/extconf.h
++ext/strscan/extconf.h
++ext/syck/extconf.h
++ext/syslog/extconf.h
++ext/tk/extconf.h
++ext/tk/tkutil/extconf.h
++ext/zlib/extconf.h
++miniprelude.c
++prelude.c
++revision.h
++*.dylib
++*.log
++*.dSYM
++patches-ruby*
@@ -0,0 +1,139 @@
+diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
+index bc16ab1..c12b168 100644
+--- a/test/drb/drbtest.rb
++++ b/test/drb/drbtest.rb
+@@ -22,7 +22,7 @@ class DRbService
+ %w(ut_drb.rb ut_array.rb ut_port.rb ut_large.rb ut_safe1.rb ut_eval.rb).each do |nm|
+ add_service_command(nm)
+ end
+- @server = @@server = DRb::DRbServer.new('druby://localhost:0', @@manager, {})
++ @server = @@server = DRb::DRbServer.new('druby://127.0.0.1:0', @@manager, {})
+ @@manager.uri = @@server.uri
+ def self.manager
+ @@manager
+@@ -79,16 +79,16 @@ module DRbCore
+ end
+
+ def test_00_DRbObject
+- ro = DRbObject.new(nil, 'druby://localhost:12345')
+- assert_equal('druby://localhost:12345', ro.__drburi)
++ ro = DRbObject.new(nil, 'druby://127.0.0.1:12345')
++ assert_equal('druby://127.0.0.1:12345', ro.__drburi)
+ assert_equal(nil, ro.__drbref)
+
+- ro = DRbObject.new_with_uri('druby://localhost:12345')
+- assert_equal('druby://localhost:12345', ro.__drburi)
++ ro = DRbObject.new_with_uri('druby://127.0.0.1:12345')
++ assert_equal('druby://127.0.0.1:12345', ro.__drburi)
+ assert_equal(nil, ro.__drbref)
+
+- ro = DRbObject.new_with_uri('druby://localhost:12345?foobar')
+- assert_equal('druby://localhost:12345', ro.__drburi)
++ ro = DRbObject.new_with_uri('druby://127.0.0.1:12345?foobar')
++ assert_equal('druby://127.0.0.1:12345', ro.__drburi)
+ assert_equal(DRb::DRbURIOption.new('foobar'), ro.__drbref)
+ end
+
+diff --git a/test/drb/ut_drb.rb b/test/drb/ut_drb.rb
+index f5720cf..265713d 100644
+--- a/test/drb/ut_drb.rb
++++ b/test/drb/ut_drb.rb
+@@ -154,7 +154,7 @@ if __FILE__ == $0
+
+ DRb::DRbServer.default_argc_limit(8)
+ DRb::DRbServer.default_load_limit(4096)
+- DRb.start_service('druby://localhost:0', DRbEx.new)
++ DRb.start_service('druby://127.0.0.1:0', DRbEx.new)
+ es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
+ DRb.thread.join
+ end
+diff --git a/test/drb/ut_drb_drbssl.rb b/test/drb/ut_drb_drbssl.rb
+index 0a2191e..bca3012 100644
+--- a/test/drb/ut_drb_drbssl.rb
++++ b/test/drb/ut_drb_drbssl.rb
+@@ -18,7 +18,7 @@ if __FILE__ == $0
+
+ DRb::DRbServer.default_argc_limit(8)
+ DRb::DRbServer.default_load_limit(4096)
+- DRb.start_service('drbssl://localhost:0', DRbEx.new, config)
++ DRb.start_service('drbssl://127.0.0.1:0', DRbEx.new, config)
+ es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
+ DRb.thread.join
+ end
+diff --git a/test/drb/ut_eval.rb b/test/drb/ut_eval.rb
+index 4df963e..9127939 100644
+--- a/test/drb/ut_eval.rb
++++ b/test/drb/ut_eval.rb
+@@ -3,7 +3,7 @@ require 'drb/extserv'
+
+ class EvalAttack
+ def initialize
+- @four = DRb::DRbServer.new('druby://localhost:0', self, {:safe_level => 4})
++ @four = DRb::DRbServer.new('druby://127.0.0.1:0', self, {:safe_level => 4})
+ end
+
+ def four
+@@ -25,7 +25,7 @@ if __FILE__ == $0
+
+ $SAFE = 1
+
+- DRb.start_service('druby://localhost:0', EvalAttack.new, {:safe_level => 2})
++ DRb.start_service('druby://127.0.0.1:0', EvalAttack.new, {:safe_level => 2})
+ es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
+ DRb.thread.join
+ end
+diff --git a/test/drb/ut_large.rb b/test/drb/ut_large.rb
+index d6717c5..0aefd1b 100644
+--- a/test/drb/ut_large.rb
++++ b/test/drb/ut_large.rb
+@@ -31,7 +31,7 @@ if __FILE__ == $0
+
+ DRb::DRbServer.default_argc_limit(3)
+ DRb::DRbServer.default_load_limit(100000)
+- DRb.start_service('druby://localhost:0', DRbLarge.new)
++ DRb.start_service('druby://127.0.0.1:0', DRbLarge.new)
+ es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
+ DRb.thread.join
+ end
+diff --git a/test/drb/ut_safe1.rb b/test/drb/ut_safe1.rb
+index 4df8e1e..5e7fe82 100644
+--- a/test/drb/ut_safe1.rb
++++ b/test/drb/ut_safe1.rb
+@@ -8,7 +8,7 @@ if __FILE__ == $0
+ it
+ end
+
+- DRb.start_service('druby://localhost:0', [1, 2, 'III', 4, "five", 6],
++ DRb.start_service('druby://127.0.0.1:0', [1, 2, 'III', 4, "five", 6],
+ {:safe_level => 1})
+ es = DRb::ExtServ.new(ARGV.shift, ARGV.shift)
+ DRb.thread.join
+diff --git a/test/net/pop/test_pop.rb b/test/net/pop/test_pop.rb
+index c8aa9a8..129ca08 100644
+--- a/test/net/pop/test_pop.rb
++++ b/test/net/pop/test_pop.rb
+@@ -3,10 +3,14 @@ require 'test/unit'
+ require 'digest/md5'
+
+ class TestPOP < Test::Unit::TestCase
++ def localhost
++ '127.0.0.1'
++ end
++
+ def setup
+ @users = {'user' => 'pass' }
+ @ok_user = 'user'
+- @stamp_base = "#{$$}.#{Time.now.to_i}@localhost"
++ @stamp_base = "#{$$}.#{Time.now.to_i}@#{localhost}"
+ end
+
+ def test_pop_auth_ok
+@@ -64,7 +68,7 @@ class TestPOP < Test::Unit::TestCase
+ end
+
+ def pop_test(apop=false)
+- host = 'localhost'
++ host = localhost
+ server = TCPServer.new(host, 0)
+ port = server.addr[1]
+ thread = Thread.start do
@@ -0,0 +1,25 @@
+diff --git a/eval.c b/eval.c
+index c2049c7..f49044a 100644
+--- a/eval.c
++++ b/eval.c
+@@ -12483,6 +12483,11 @@ rb_thread_start_0(fn, arg, th)
+ curr_thread->next = th;
+ th->priority = curr_thread->priority;
+ th->thgroup = curr_thread->thgroup;
++#if defined(HAVE_SETITIMER) || defined(_THREAD_SAFE)
++ if (!thread_init) {
++ rb_thread_start_timer();
++ }
++#endif
+ }
+ START_TIMER();
+
+@@ -13211,7 +13216,9 @@ rb_thread_atfork()
+ main_thread = curr_thread;
+ curr_thread->next = curr_thread;
+ curr_thread->prev = curr_thread;
+- STOP_TIMER();
++#if defined(HAVE_SETITIMER) || defined(_THREAD_SAFE)
++ rb_thread_stop_timer();
++#endif
+ }
Oops, something went wrong.

0 comments on commit c97e36d

Please sign in to comment.