segfault when running with the rubygem version of Iterator

M

Mark Sparshatt

I'm trying to use aeditor with the gem version of the Iterator library
and am getting the following error

/usr/local/lib/ruby/site_ruby/1.8/aeditor/lexer.rb:4: [BUG] Segmentation
fault
ruby 1.8.0 (2003-08-04) [i686-linux]

this can be fixed by either

1: uninstalling the iterator gem and installing it from a tar.gz

2: changing buffer.rb to replace the line
require 'iterator'

with

require 'rubygems'
require_gem 'iterator'

so the problem only manifests when using the gem version of iterator
through the stub file.

this is using
aeditor version 1.3
rubygems version 0.7
iterator version 0.8
 
J

Jim Weirich

Mark said:
I'm trying to use aeditor with the gem version of the Iterator library [...]
so the problem only manifests when using the gem version of iterator
through the stub file.

Mark, I'm trying to understand why the stub file is not working.
Unfortunately, I'm unable to duplicate the problem. Do you have any
insight on the root cause of the problem? What version of RubyGems was
used to generate the stub?
 
M

Mark Sparshatt

Jim said:
Mark said:
I'm trying to use aeditor with the gem version of the Iterator library
[...]

so the problem only manifests when using the gem version of iterator
through the stub file.


Mark, I'm trying to understand why the stub file is not working.
Unfortunately, I'm unable to duplicate the problem.

I've tested it on a different machine and it worked, so it does seem to
be something on this particular machine.
Do you have any insight on the root cause of the problem?

After investigating this a bit the best I could figure out was that
modifying $: and $" leaves the system in an unstable state so that any
further requires cause problems.

I tried this test program

require "requiretest"
require "optparse"

where requiretest.rb contains
$".delete('requiretest.rb')
$:.unshift('lib')
require 'requiretest'

and lib/requiretest.rb contains
puts "test"

this doesn't segfault but it does hang when it reachs the require
'optparse' line, so that I need to do killall ruby in order to get it to
exit.
What version of RubyGems was used to generate the stub?
gem -v
=> 0.7.0

This is the stub file

require 'rubygems'
$".delete('iterator.rb')
require_gem 'iterator'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top