Skip to content

Instantly share code, notes, and snippets.

View voxik's full-sized avatar

Vít Ondruch voxik

View GitHub Profile
From 0b463ad1ad85dac5617c8ccc402a94c4eaddeb06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 24 Jan 2012 16:22:55 +0100
Subject: [PATCH] Add encoding directive.
This lets the test suite pass with Ruby 1.9.3.
---
spec/i18n_data_spec.rb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
# ./ruby -rcontinuation -e 'cont = nil; callcc { |k| cont = k }; cont.call'
-e:1: [BUG] Segmentation fault
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :callcc
c:0003 p:0015 s:0007 b:0007 l:0009d8 d:000500 EVAL -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0009d8 d:0009d8 TOP
(gdb) where
#0 x86_64_fallback_frame_state (fs=0x7fffffffc7f0, context=<optimized out>) at ./md-unwind-support.h:53
#1 uw_frame_state_for (context=context@entry=0x7fffffffc700, fs=fs@entry=0x7fffffffc7f0) at ../../../libgcc/unwind-dw2.c:1187
#2 0x00007ffff6067f0c in _Unwind_Backtrace (trace=0x7ffff6bda680 <backtrace_helper>, trace_argument=0x7fffffffc9b0) at ../../../libgcc/unwind.inc:290
#3 0x00007ffff6bda808 in __GI___backtrace (array=array@entry=0x7fffffffcf60, size=size@entry=64) at ../sysdeps/ia64/backtrace.c:110
#4 0x00007ffff6b4d76f in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff6c4ccaa "*** %s ***: %s terminated\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:178
#5 0x00007ffff6bde387 in __GI___fortify_fail (msg=0x7ffff6c4cc69 "longjmp causes uninitialized stack frame") at fortify_fail.c:32
#6 0x00007ffff6bde2ed in ____longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S:91
#7 0x00007ffff6bde253 in __longjmp_chk (env=env@entry=0xbc5f90, val=val@entry=1) at .
# ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" -v test/ruby/test_array.rb
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" -v
# Running tests:
TestArray#test_00_new = 0.00 s = .
TestArray#test_01_square_brackets = 0.00 s = .
TestArray#test_0_literal = 0.00 s = .
TestArray#test_AND = 0.00 s = .
TestArray#test_AREF = 0.00 s = .
TestArray#test_combination_with_callcc = *** longjmp causes uninitialized stack frame ***: ./ruby terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x45)[0x49fbc5]
/lib/libc.so.6(+0x107b1a)[0x49fb1a]
/lib/libc.so.6(__longjmp_chk+0x4b)[0x49fa8b]
/builddir/build/BUILD/ruby-1.9.3-p0/libruby.so.1.9.1(+0x164f73)[0x274f73]
======= Memory map: ========
00110000-0030c000 r-xp 00000000 09:02 11931722 /builddir/build/BUILD/ruby-1.9.3-p0/libruby.so.1.9.1
0030c000-00310000 rw-p 001fc000 09:02 11931722 /builddir/build/BUILD/ruby-1.9.3-p0/libruby.so.1.9.1
00310000-00320000 rw-p 00000000 00:00 0
From 3dd6021766f83c43e3365f8d96d51adb7ea4ef1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 16 Dec 2011 14:38:27 +0100
Subject: [PATCH 2/2] Test for activating only inactive gems.
---
test/rubygems/test_gem_specification.rb | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
module Gem
class << self
##
# Returns a string representing that part or the directory tree that is
# common to all specified directories.
def common_path(dirs)
paths = dirs.collect {|dir| dir.split(File::SEPARATOR)}
uncommon_idx = paths.transpose.each_with_index.find {|dirnames, idx| dirnames.uniq.length > 1}.last
From d35bd09c4efda2c46059f81fb3e6fc2b6a9e4c12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 9 Dec 2011 18:41:36 +0100
Subject: [PATCH] Try to activate only inactive gems.
---
lib/rubygems.rb | 2 +-
lib/rubygems/specification.rb | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
# spec spec/server/pipelining_spec.rb
which: no swiftiply in (/usr/lib/ccache:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/builddir/.local/bin:/builddir/bin)
FF..F.
1)
'Thin::Server HTTP pipelining should pipeline request on same socket' FAILED
expected "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nConnection: close\r\nServer: thin 1.3.1 codename Triple Espresso\r\n\r\n/first-1" to include "/first-1" and "/second-2"
./spec/server/pipelining_spec.rb:25:
2)
From 2da1a77af2802c6ba2733a18269eeec688dd4214 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 29 Nov 2011 15:59:34 +0100
Subject: [PATCH] Remove RSpec1 requires
---
spec/spec_helper.rb | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb