bugGNU Octave - Bugs: bug #36778, Problem with matrix access in oct...

 
 

bug #36778: Problem with matrix access in oct files with versions > 3.4.3

Submitter:  Sylvain Marchand <zygen>
Submitted:  Tue 03 Jul 2012 04:01:48 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.6.2 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 04 Sep 2013 03:54:25 PM UTC, comment #5: 

No response for 2 months.  Closing report.

Rik <rik5>
Group administrator
Sat 22 Jun 2013 01:01:24 PM UTC, comment #4: 

Can anyone with a OsS X version of Octave confirm that this bug still exists ?

D.

David Bateman <dbateman>
Group Member
Wed 04 Jul 2012 05:29:51 PM UTC, comment #3: 

No, I don't have access to a system running OS X.  If it is specific to OS X, then someone else will have to verify and debug this problem.

John W. Eaton <jwe>
Group administrator
Wed 04 Jul 2012 05:24:04 PM UTC, comment #2: 

Thank you very much for your time.

I have a MacOS 10.6.8 system, with octave from the fink distribution.

When I execute it, I get:

octave:1> inspect
Will be displayed...
ans = 0

i.e. the value is not displayed, and the second text line neither.
[as if the I/O were blocked]

Everything is fine with octave 3.4.3.
But with more recent versions, I get the incorrect execution.
I have tried both 32-bit and 64-bit compilation, and octave 3.6.0, 3.6.1, and 3.6.2.  The problem is the same.
But maybe MacOS or fink specific?

Do you have access to a Mac version?

Thanks again.

Sylvain.


Sylvain Marchand <zygen>
Wed 04 Jul 2012 05:10:20 PM UTC, comment #1: 

I don't understand what the problem is.

I don't see any errors from valgrind with 3.6.2 on my Debian system with this .oct file and it prints the following messages when I execute it:


octave:1> inspect
Will be displayed...
123.456
Will NOT be displayed on recent Octave versions...
ans = 0



John W. Eaton <jwe>
Group administrator
Tue 03 Jul 2012 04:01:48 PM UTC, original submission:  

 Hello,

I encounter memory access problems with Matrix in oct files with octave versions > 3.4.3.

For example, the following code works with octave 3.4.3, but fails with octave 3.6.2.
[built with 'CXXFLAGS=-O2 mkoctfile inspect.cc' on MacOS 10.6.8]

Is this a bug or am I wrong (I have read the docs, the forums, and this code is quite simple...)?

Thanks in advance.

 Best regards,

Sylvain.

--

#include <octave/oct.h>
#include <octave/parse.h>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string.h>

using namespace std;

DEFUN_DLD (inspect, args, , "inspect")
{
  Matrix signal = Matrix (1,2);

  signal(0) = 123.456;

  cout << "Will be displayed..." << endl;

  cout << signal(0) << endl;

  cout << "Will NOT be displayed on recent Octave versions..." << endl;

  return octave_value(0);
}

// End Of File

Sylvain Marchand <zygen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by zygen (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-04 rik5 Open/ClosedOpen Closed
    2012-07-04 jwe StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code