Tue 25 May 2010 10:11:14 PM UTC, comment #2:
Backtrace from current tip
Program received signal SIGSEGV, Segmentation fault.
0x00000035a72a59d3 in std::string::length() const () from /usr/lib/libstdc++.so.6
(gdb) bt
#0 0x00000035a72a59d3 in std::string::length() const () from /usr/lib/libstdc++.so.6
#1 0x00007ffff75fa806 in string_vector::max_length (this=0x7fffffffc470) at ../liboctave/str-vec.h:80
#2 0x00007ffff6742db1 in charMatrix (this=0x7fffffffc070, s=...) at chMatrix.cc:79
#3 0x00007ffff7707c90 in charNDArray (this=0x7fffffffc0f0, s=...) at ../liboctave/chNDArray.h:57
#4 0x00007ffff7725326 in octave_char_matrix (this=0xca4800, s=...) at ov-ch-mat.h:78
#5 0x00007ffff772566d in octave_char_matrix_str (this=0xca4800, s=...) at ov-str-mat.h:79
#6 0x00007ffff772582d in octave_char_matrix_sq_str (this=0xca4800, s=...) at ov-str-mat.h:204
#7 0x00007ffff76fc18e in octave_value (this=0x7fffffffc280, s=..., type=39 '\'') at ov.cc:809
#8 0x00007ffff76f5f02 in octave_user_function::bind_automatic_vars (this=0x6aa2b0, arg_names=..., nargin=3, nargout=0, va_args=...)
at ov-usr-fcn.cc:528
#9 0x00007ffff76f555a in octave_user_function::do_multi_index_op (this=0x6aa2b0, nargout=0, args=...) at ov-usr-fcn.cc:395
#10 0x00007ffff76ffe4a in octave_value::do_multi_index_op (this=0x7fffffffc610, nargout=0, idx=...) at ov.cc:1244
#11 0x00007ffff755d666 in feval (name=..., args=..., nargout=0) at oct-parse.yy:4104
#12 0x00007ffff755da82 in feval (args=..., nargout=0) at oct-parse.yy:4169
#13 0x00007ffff755dcce in Ffeval (args=..., nargout=0) at oct-parse.yy:4212
#14 0x00007ffff76703af in octave_builtin::do_multi_index_op (this=0x74e238, nargout=0, args=...) at ov-builtin.cc:107
#15 0x00007ffff767010d in octave_builtin::subsref (this=0x74e238, type=..., idx=..., nargout=0) at ov-builtin.cc:55
#16 0x00007ffff76ff9fe in octave_value::subsref (this=0x7fffffffcda0, type=..., idx=..., nargout=0) at ov.cc:1190
#17 0x00007ffff778836d in tree_index_expression::rvalue (this=0xcbe180, nargout=0) at pt-idx.cc:401
#18 0x00007ffff778850a in tree_index_expression::rvalue1 (this=0xcbe180, nargout=0) at pt-idx.cc:412
#19 0x00007ffff7781b13 in tree_evaluator::visit_statement (this=0x7ffff7ff9118, stmt=...) at pt-eval.cc:722
#20 0x00007ffff779ddf2 in tree_statement::accept (this=0xcca2e0, tw=...) at pt-stmt.cc:152
#21 0x00007ffff7781cfe in tree_evaluator::visit_statement_list (this=0x7ffff7ff9118, lst=...) at pt-eval.cc:758
#22 0x00007ffff779e1a0 in tree_statement_list::accept (this=0xcca300, tw=...) at pt-stmt.cc:216
#23 0x00007ffff7612433 in main_loop () at toplev.cc:575
#24 0x00007ffff75ce24a in octave_main (argc=6, argv=0x7fffffffd2f8, embedded=0) at octave.cc:882
#25 0x00000000004008f9 in main (argc=6, argv=0x7fffffffd2f8) at main.c:35
|
Tue 25 May 2010 08:09:01 PM UTC, original submission:
Some testing functions in on octave-forge/main/optim are failing with a segmentation fault. I tried to identify the the problem and could reduce the problem to the following test case.
clear
clear functions
function v = ff(x,y,t)
v = x'*y;
endfunction
aa{1}=[1;2];
aa{2}=[2;3];
aa{3}=1;
f = 'ff';
feval (f, aa{1}, aa{2}, aa{3}) # is fine
feval (f, aa{:}) # segmentation fault,
The last command "feval(f,aa{:})" causes a segmentation fault, while the previous one works fine.
Alois
|