SEGV on zipruby with irb

e$B$$$^$$$G$9!#e(B

zipruby[1] e$B$H$$$&e(B gem
e$B$r;H$C$F$$$k$N$G$9$,!"0J2<$N$h$&$J%9%/%j%W%H$re(B
irb e$B$G<B9T$9$k$He(B SEGV e$B$7$^$9!#e(B

  1. http://zipruby.rubyforge.org/ e$B$Ne(B 0.3.2 e$B$G$9!#e(B

e$B4D6-$O!"e(BDebian e$B%Q%C%1!<%8$Ne(B ruby1.8(1.8.7.249-1) e$B$He(B
rubygems1.8(1.3.5-2)e$B$G$9!#e(Bruby1.8.8dev
e$B$O<+J,$G%S%k%I$7$?$b$N$G$9!#e(B

$ cat z.rb
require “rubygems”
require “zipruby”

p RUBY_DESCRIPTION
zip = Zip::Archive.open(“foo.zip”, Zip::CREATE)
zip.add(“foo”){}
GC.start
zip.close
$ irb -rubygems z.rb

require “rubygems”
=> false

require “zipruby”
=> true

?> p RUBY_DESCRIPTION
“ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]”
=> nil

zip = Zip::Archive.open(“foo.zip”, Zip::CREATE)
=> #Zip::Archive:0xb6e17fc4

zip.add(“foo”){}
=> nil

GC.start
=> nil

zip.close
z.rb:8: [BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]

Aborted (core dumped)

e$B0z?t$Ge(B rubygems e$B$re(B require
e$B$7$J$$$H!"%(%i!<$K$O$J$k$b$N$Ne(B SEGV e$B$K$O$Je(B
e$B$j$^$;$s!#e(B

$ irb z.rb

require “rubygems”
=> true

require “zipruby”
=> true

?> p RUBY_DESCRIPTION
“ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]”
=> nil

zip = Zip::Archive.open(“foo.zip”, Zip::CREATE)
=> #Zip::Archive:0xb6d3a534

zip.add(“foo”){}
=> nil

GC.start
=> nil

zip.close
z.rb:8: warning: Error in Proc: undefined method call' for "_ = IRB.CurrentContext.last_value":String (NoMethodError) Zip::Error: Close archive failed: Internal error from z.rb:8:inclose’
from z.rb:8
from (null):0

ruby e$B$GD>@<B9T$9$k$H!"0z?t$Ge(B rubygems e$B$re(B require
e$B$9$k$7$J$$$K4X$o$i$:!"e(B
e$B%(%i!<$O5/$3$i$:@5>o$K=*N;$7$^$9!#e(B

$ ruby -rubygems z.rb
“ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]”
$ ruby z.rb
“ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]”

ruby 1.8.8dev (2010-01-19 revision 26358) [i686-linux] [email protected]$H!“e(Birb
e$B$G$O:Ge(B
e$B8e$N%(%i!<%a%C%;!<%8$,0J2<$N$h$&$KJQ$o$j$^$9$,!”$I$A$i$NJ}K!$Ge(B
rubygems e$B$re(B require e$B$7$F$b!"e(BSEGV e$B$K$O$J$j$^$;$s!#e(B

zip.close
z.rb:8: warning: Error in Proc: undefined method call' for "/home/nov/ruby1.8/lib/ruby/1.8/irb/workspace.rb":String (NoMethodError) Zip::Error: Close archive failed: Internal error from z.rb:8:inclose’
from z.rb:8
from /home/nov/ruby1.8/lib/ruby/1.8/date.rb:814

ruby e$B$GD>@<B9T$9$k$HLdBj$J$$$N$Oe(B 1.8.7
e$B$HF1$8$G$9!#$I$NAH$_9g$o$;$G$b!“e(B
GC.start e$B$N9T$r>C$9$H!”@5>o$K=*N;$7$^$9!#e(B

  • SEGV e$B$K$J$k$N$Oe(B zipruby e$B$NLdBj$G$7$g$&$+!)e(B
  • irb e$B$N0z?t$Ge(B require e$B$9$k$N$H!"e(Birb e$B$,5/F0$7$F$+$ie(B
    require e$B$9$k$N$O!“e(B
    e$B2?$+0c$$$,$”$k$N$G$7$g$&$+!)e(B
  • irb e$B$G$O%(%i!<$de(B SEGV e$B$K$J$C$F!"e(Bruby
    e$B$G$O$&$^$/9T$/$N$O!"e(Birb e$B$NLdBje(B
    e$B$G$7$g$&$+!)e(B

e$B$H$$$&JU$j$,CN$j$?$$$G$9!#e(B

[email protected]>;3OB9-$G$9!#e(B

At Thu, 21 Jan 2010 01:52:28 +0900,
Nobuhiro IMAI wrote:

zipruby[1] e$B$H$$$&e(B gem e$B$r;H$C$F$$$k$N$G$9$,!"0J2<$N$h$&$J%9%/%j%W%H$re(B
irb e$B$G<B9T$9$k$He(B SEGV e$B$7$^$9!#e(B

  1. http://zipruby.rubyforge.org/ e$B$Ne(B 0.3.2 e$B$G$9!#e(B

e$B4D6-$O!"e(BDebian e$B%Q%C%1!<%8$Ne(B ruby1.8(1.8.7.249-1) e$B$He(B
rubygems1.8(1.3.5-2)e$B$G$9!#e(Bruby1.8.8dev e$B$O<+J,$G%S%k%I$7$?$b$N$G$9!#e(B

ruby 1.8.8dev (2010-01-01 revision 26226) [x86_64-linux]
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770,
Ruby Enterprise Edition 2009.10
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux], MBARI 0x8770, Ruby
Enterprise Edition 2009.10
e$B$J$I$G;n$7$F$_$^$7$?$,!"e(BSEGV e$B$O:F8=$7$^$;$s$G$7$?!#e(B

e$B%$%s%9%H!<%k$5$l$?$N$,e(B zipruby 0.3.6 [email protected]$C$?$N$G!"e(B
0.3.2 e$B$rF~$lD>$7$F$_$?$H$3$m%(%i!<$O:F8=$7$^$7$?!#e(B

e$B?7$7$$e(B zipruby e$B$G$OD>$C$F$$$k$h$&$J$N$G!"e(Bziprubye$B$Ne(B
[email protected]$C$?$N$G$O$J$$$+$H;W$$$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs