Strange segfault on Linux with test-unit

D

Daniel Berger

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
 
T

ts

D> Any ideas on this one?

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


Guy Decoux

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

Daniel Berger

ts said:
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
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top