Bugs: Browse | Submit New | Admin

[#5701] ruby-1.8.5 loads fox16.so more than once (cyclic require)

Date:
2006-09-09 01:59
Priority:
3
Submitted By:
Lyle Johnson (lyle)
Assigned To:
Shyouhei Urabe (shyouhei)
Category:
External APIs / Interfacing
State:
Open
Platform:
 
Summary:
ruby-1.8.5 loads fox16.so more than once (cyclic require)

Detailed description
The behavior of require seems to have changed between Ruby versions 1.8.4 and 1.8.5. After upgrading ruby from 1.8.4
to 1.8.5, requiring "fox16" (a compiled extension module) causes a warning for each constant, and $"
shows that "fox16.bundle" has been loaded more than once. We've confirmed that this also happens for the Linux
build, and presumably it also happens on Windows.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-01-21 20:13
Sender: Laurent Julliard

Has this been fixed in 1.8.5 patch 12?
Date: 2007-01-21 01:50
Sender: Jonathan Allen

I can confirm that it occurs in Windows.

I highly suggest you consider adding "Run FreeRIDE, look
at conole output" and "Run fxri, look at conole output"
to your pre-release test plan. I find it quite discouraging that
something this obvious slipped through your procedures.
Date: 2006-11-02 06:36
Sender: Ryan Davis

This is a bad design. simple.c file requires helper.rb which
in turn requires simple.c. This is the cyclic require issue.
If it has changed in 1.8.5 it has slipped by me. I'm going to
assign to matz for verification.
Date: 2006-10-28 18:44
Sender: Ed Borasky

Yes, I've seen it with the One-Click on Windows
Date: 2006-09-09 14:32
Sender: Lyle Johnson

In order to reproduce the bug, dowload and unpack the attached
tarball
(simple.tar.gz). This contains three files: simple.c, helper.rb
and the
extconf.rb file. Run the extconf.rb script to create a Makefile
for your
operating system, then type "make" to build the
extension.

Once you've built the extension, start up "irb" and
then type: require "simple".
You should get a warning message, "already initialized constant
FOO". If you
inspect the value of $", you will see that the shared library
part
(simple.bundle, or simple.so, depending on your operating system)
has been
loaded twice.

Attached Files:

Name Description Download
simple.tar.gz Download

Changes:

Field Old Value Date By
category_idMisc / Other Standard Library2007-05-29 21:46zenspider
assigned_tomatz2007-05-29 17:21zenspider
category_idLanguage / Runtime / Core Libraries2007-05-29 15:54zenspider
assigned_tonone2006-11-02 06:36zenspider
summaryruby-1.8.5 loads fox16.so more than once2006-11-02 06:36zenspider
File Added795: simple.tar.gz2006-09-09 14:33lyle