#308 octave: segfault-on-exit fixup, octave_dim tests

closed-accepted
None
5
2012-04-15
2012-04-10
No

Two minor patches to the Octave module:

1) This patch is a fixup to revision r12912 (Fix imports test). I found that this line, which clears all global variables:
| symbol_table::clear_global_pattern("*");
causes octave 3.2.4 (particularly the Debian squeeze binary) to segfault on exit under certain circumstances when dependent modules are loaded. Xavier's original code to clear global variables:
| string_vector vars = symbol_table::global_variable_names();
| for (int i = 0; i < vars.length(); i++) symbol_table::clear_global(vars[i]);
doesn't cause the same segfault behaviour (I suspect this is a bug in octave 3.2.4 since I haven't seen this in later octave versions). Since the two methods do the same thing anyway, this patch reverts to using Xavier's code. Checked that the octave test-suite and examples pass for octave versions 3.0.5, 3.2.4, 3.4.3, and 3.6.1.

2) This patch is a minor fix to the __dims__ operator and octave_dim tests to make the test-suite pass for octave versions != 3.2.4. octave 3.0.5 requires dim_vectors to be at least 2 dimensions, and octave >= 3.4.3 have deprecated the Array(r,c) constructor in favour of Array(dim_vector(r,c)).

Discussion

  • Anonymous - 2012-04-10
    • assigned_to: nobody --> xavier98
     
  • Anonymous - 2012-04-15

    Committed for SWIG 2.0.5 in r12994 and r12995

     
  • Anonymous - 2012-04-15
    • status: open --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks