octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50068] Segfault, when eval_string is used in


From: Dmitry Messerman
Subject: [Octave-bug-tracker] [bug #50068] Segfault, when eval_string is used in interpreter embedded mode
Date: Wed, 18 Jan 2017 06:58:31 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #2, bug #50068 (project octave):

Answering your questions:

1) Very similar code worked for 4.0.2
   I've changed only header from toplev.h to interpreter.h
   Note that on 4.2.0 version with toplev.h segfaults as well
2) There are other scenarios, where feval is not applicable.
   Attached below is example of more generic case, which works
   on 4.0.2 and segfaults on 4.2.0

#include <string>
#include <octave/oct.h>
#include <octave/octave.h>
#include <octave/parse.h>
#include <octave/toplev.h>

int main (int argc, char** argv) {
  string_vector octave_argv (2);
  octave_argv(0) = "embedded";
  octave_argv(1) = "-q";
  octave_main (2, octave_argv.c_str_vec (), 1);
  int parse_status;
  eval_string(std::string("[2,1;1,2]\\[1;1]"),0, parse_status);
  std::_Exit(0);
  return 0;
}

Expected output from 4.0.2:

ans =

   0.333333333333333
   0.333333333333333

Current output from 4.2.0:

Segmentation fault


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50068>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]