[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Strange segfault on Linux with test-unit

djberg96

5/9/2005 2:12:00 AM

Hi all,

Ruby 1.8.2 (built with --enable-pthread)
Suse Linux 9.3 Pro
sys-proctable 0.7.0

I've getting some strange behavior with the test cases for the Linux
version of sys-proctable. There are two test cases in particular that
are the issue: tc_linux.rb and tc_all.rb.

Running the tc_linux.rb script causes a segfault. Now, tc_linux.rb
does a 'require "tc_all"' internally. If I comment that out, then
running tc_linux.rb works fine.

Initially, I thought that must mean there's a problem in tc_all.rb.
But, if I run tc_all.rb by itself, it works fine as well. So, each
test case works fine individually, but fails if I try to have one
require the other internally.

Within linux.c I commented out all of the code for ProcTable.ps and
ProcTable.fields, having them do nothing except return nil. After
that, I ran tc_linux.rb again and got this error:

/usr/local/lib/ruby/1.8/test/unit.rb:285: [BUG] Segmentation fault
ruby 1.8.2 (2004-12-25) [i686-linux]

Aborted

Where line 285, part of the at_exit definition, is: exit
Test::Unit::AutoRunner.run($0 != "-e" && $0)

Any ideas on this one?

Regards,

Dan

3 Answers

ts

5/9/2005 2:10:00 PM

0

>>>>> "D" == Daniel Berger <djberg96@hotmail.com> writes:

D> Any ideas on this one?

Don't copy proctable.so in the directory sys ?


Guy Decoux

p.s. : don't ask me why ...







djberg96

5/10/2005 4:02:00 AM

0


ts wrote:
> >>>>> "D" == Daniel Berger <djberg96@hotmail.com> writes:
>
> D> Any ideas on this one?
>
> Don't copy proctable.so in the directory sys ?
>
>
> Guy Decoux
>
> p.s. : don't ask me why ...

You're right. Actually, I added a File.delete("sys/proctable.so")
before the copy in tc_linux.rb and that seems to fix it. Curious.

Thanks.

Dan

Paul Brannan

5/10/2005 1:59:00 PM

0

On Mon, May 09, 2005 at 11:09:51PM +0900, ts wrote:
> p.s. : don't ask me why ...

Because you don't know the answer or you don't know how to explain?

I am curious why this helps.

Paul