tomz/liblinear-ruby-swig — Issue #6: Segfault in Solver_MCSVM_CS::Solve(double*) -- liblinear.so
Author: mqt
Created: 2012-03-09 21:02:15+00:00
State: open

Don't know why but i got a segfault:

/usr/lib64/ruby/gems/1.8/gems/tomz-liblinear-ruby-swig-0.1.1/lib/linear.rb:216: [BUG] Segmentation fault
ruby 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux]

gdb output:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5ede608 in Solver_MCSVM_CS::Solve(double*) () from /usr/lib64/ruby/gems/1.8/gems/tomz-liblinear-ruby-swig-0.1.1/ext/liblinear.so
(gdb) bt
#0 0x00007ffff5ede608 in Solver_MCSVM_CS::Solve(double*) () from /usr/lib64/ruby/gems/1.8/gems/tomz-liblinear-ruby-swig-0.1.1/ext/liblinear.so
#1 0x00007ffff5edfca7 in train () from /usr/lib64/ruby/gems/1.8/gems/tomz-liblinear-ruby-swig-0.1.1/ext/liblinear.so
#2 0x00007ffff5ed5dc8 in _wrap_train(int, unsigned long*, unsigned long) () from /usr/lib64/ruby/gems/1.8/gems/tomz-liblinear-ruby-swig-0.1.1/ext/liblinear.so
#3 0x00007ffff7b119c6 in rb_call0 () from /usr/lib64/libruby18.so.1.8
#4 0x00007ffff7b11b97 in rb_call () from /usr/lib64/libruby18.so.1.8
#5 0x00007ffff7b170c7 in rb_eval () from /usr/lib64/libruby18.so.1.8
#6 0x00007ffff7b18ad1 in rb_eval () from /usr/lib64/libruby18.so.1.8
#7 0x00007ffff7b18b0f in rb_eval () from /usr/lib64/libruby18.so.1.8
#8 0x00007ffff7b11890 in rb_call0 () from /usr/lib64/libruby18.so.1.8
#9 0x00007ffff7b11b97 in rb_call () from /usr/lib64/libruby18.so.1.8
#10 0x00007ffff7b11ec8 in rb_funcall2 () from /usr/lib64/libruby18.so.1.8
#11 0x00007ffff7b11f62 in rb_obj_call_init () from /usmr/lib64/libruby18.so.1.8
#12 0x00007ffff7b402c0 in rb_class_new_instance () from /usr/lib64/libruby18.so.1.8
#13 0x00007ffff7b119c6 in rb_call0 () from /usr/lib64/libruby18.so.1.8
#14 0x00007ffff7b11b97 in rb_call () from /usr/lib64/libruby18.so.1.8
#15 0x00007ffff7b170c7 in rb_eval () from /usr/lib64/libruby18.so.1.8
#16 0x00007ffff7b178bd in rb_eval () from /usr/lib64/libruby18.so.1.8
#17 0x00007ffff7b1da6b in ruby_exec_internal () from /usr/lib64/libruby18.so.1.8
#18 0x00007ffff7b1dab5 in ruby_exec () from /usr/lib64/libruby18.so.1.8
#19 0x00007ffff7b202d5 in ruby_run () from /usr/lib64/libruby18.so.1.8
#20 0x0000000000400961 in main ()

After removing liblinear.so and recompiling it (make) everything seems fine.