bugGNU Octave - Bugs: bug #53446, Segmentation fault of standalone...

 
 

bug #53446: Segmentation fault of standalone program (stable branch 4.3.0+)

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Sat 24 Mar 2018 04:53:08 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 26 Mar 2018 11:24:31 PM UTC, comment #5: 

OK I found that what is wrong.


export LD_LIBRARY_PATH=/opt/octave-stable/lib/octave/4.3.0+:$LD_LIBRARY_PATH
export PATH=/opt/octave-stable/bin:$PATH


and start octave


export LD_LIBRARY_PATH=/opt/octave-stable/lib/octave/4.3.0+:$LD_LIBRARY_PATH
export PATH=/opt/octave-stable/bin:$PATH



octave:1> getenv LD_LIBRARY_PATH
ans = /opt/octave-stable/lib/octave/4.3.0+:/usr/local/lib


but
octave:2> system bash
$ echo LD_LIBRARY_PATH
/usr/local/lib

It is reasonable because 'system bash' creates a new bash session.

Sorry for noise.
Please close this

Tatsuro MATSUOKA <tmacchant>
Mon 26 Mar 2018 06:32:10 PM UTC, comment #4: 

Both work for me on Debian as well, I don't see anything wrong with the examples or the way they are built.

The stack trace in the original post is reporting an error of "free(): invalid next size (fast)" from glibc. This is suspiciously similar to the error I get when I don't set LD_LIBRARY_PATH correctly and load the wrong Octave libraries.

Can you show a complete set of command lines that you used to build and run the examples on GNU/Linux? Please include the -v option on your mkoctfile command line.

Mike Miller <mtmiller>
Group Member
Sun 25 Mar 2018 05:43:13 PM UTC, comment #3: 

I executed two codes on octave-4.2.2 for windows.

standalone.cc -- works correctly.

embedded.cc


GCD of [10, 15] is 5
terminate called after throwing an instance of 'octave::exit_exception'

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Not segmentation fault but exception.

GDB back trace indicates that error occurred in liboctinterp-4.dlll.

I will build 4.3.0+ for windows on mxe and test.

Tatsuro MATSUOKA <tmacchant>
Sat 24 Mar 2018 09:25:33 PM UTC, comment #2: 


> Are you sure that you are running with the proper libraries?


As is written in
http://octave.1599824.n4.nabble.com/Calling-Octave-from-C-td4687200.html#a4687249

I noticed to set LD_LIBRARY_PATH.

I used export command in the execution shell.
And also set PATH to local octave to be called.

Seems to be system dependent.

Tatsuro MATSUOKA <tmacchant>
Sat 24 Mar 2018 04:51:58 PM UTC, comment #1: 

Both of these work properly for me with a copy of Octave built and installed from HG ID 15d2f32db174 (stable) tip.

Are you sure that you are running with the proper libraries?  If you install Octave in non-standard location, you may need to use LD_LIBRARY_PATH to ensure that you are using the libraries that correspond to your self-installed Octave instead of some other one that is installed on the system.

I installed in /usr/local/octave/dev-stable, so I used


$ mkoctfile --link-stand-alone -o standalone standalone.cc
$ mkoctfile --link-stand-alone -o embedded embedded.cc
$ LD_LIBRARY_PATH=/usr/local/octave/dev-stable/lib/octave/4.3.0+ ./standalone
Hello Octave world!
 11 12
 21 22
$ LD_LIBRARY_PATH=/usr/local/octave/dev-stable/lib/octave/4.3.0+ ./embedded
GCD of [10, 15] is 5


John W. Eaton <jwe>
Group administrator
Sat 24 Mar 2018 04:53:08 AM UTC, original submission:  

This comes from octave-help list by andrea.delbravo

I preformed tests on octave 4.3.0+ (changeset 24989:15d2f32db174 stable tip) on Ubuntu 16.04.

I execute two codes on octave documentation

standalone.cc

#include <iostream>
#include <octave/oct.h>

int
main (void)
{
  std::cout << "Hello Octave world!\n";

  int n = 2;
  Matrix a_matrix = Matrix (n, n);

  for (octave_idx_type i = 0; i < n; i++)
    for (octave_idx_type j = 0; j < n; j++)
      a_matrix(i,j) = (i + 1) * 10 + (j + 1);

  std::cout << a_matrix;

  return 0;
}


embedded.cc

#include <iostream>
#include <octave/oct.h>
#include <octave/octave.h>
#include <octave/parse.h>
#include <octave/interpreter.h>

int
main (void)
{
  // Create interpreter.

  octave::interpreter interpreter;

  try
    {
      // Inhibit reading history file by calling
      //
      //   interpreter.initialize_history (false);

      // Set custom load path here if you wish by calling
      //
      //   interpreter.initialize_load_path (false);

      // Perform final initialization of interpreter, including
      // executing commands from startup files by calling
      //
      //   int status interpreter.initialize ();
      //
      //   if (! interpreter.initialized ())
      //     {
      //       std::cerr << "Octave interpreter initialization failed!"
      //                 << std::endl;
      //       exit (status);
      //     }
      //
      // You may skip this step if you don't need to do do anything
      // between reading the startup files and telling the interpreter
      // that you are ready to execute commands.

      // Tell the interpreter that we're ready to execute commands:

      int status = interpreter.execute ();

      if (status != 0)
        {
          std::cerr << "creating embedded Octave interpreter failed!"
                    << std::endl;
          return status;
        }

      octave_idx_type n = 2;
      octave_value_list in;

      for (octave_idx_type i = 0; i < n; i++)
        in(i) = octave_value (5 * (i + 2));

      octave_value_list out = octave::feval ("gcd", in, 1);

      if (out.length () > 0)
        std::cout << "GCD of ["
                  << in(0).int_value ()
                  << ", "
                  << in(1).int_value ()
                  << "] is " << out(0).int_value ()
                  << std::endl;
      else
        std::cout << "invalid\n";
    }
  catch (const octave::exit_exception& ex)
    {
      std::cerr << "Octave interpreter exited with status = "
                << ex.exit_status () << std::endl;
    }
  catch (const octave::execution_exception&)
    {
      std::cerr << "error encountered in Octave evaluator!" << std::endl;
    }

  return 0;
}


For standalone.cc, octave crash with messages;

LC_ALL=C ./standalone
Hello Octave world!


*** Error in `./standalone': free(): invalid next size (fast): 0x00000000016883a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fa7eaa037e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fa7eaa0c37a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fa7eaa1053c]
./standalone(_ZN5ArrayIdED1Ev+0x39)[0x4016f9]
./standalone(main+0x189)[0x401519]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fa7ea9ac830]
./standalone(_start+0x29)[0x4015e9]
======= Memory map: ========
00400000-00403000 r-xp 00000000 08:06 1966150                            /home/mousei7/work/Octave/octave-ML/Calling_Octave_from_Cpp/octave-stable/standalone
00602000-00603000 r--p 00002000 08:06 1966150                            /home/mousei7/work/Octave/octave-ML/Calling_Octave_from_Cpp/octave-stable/standalone
00603000-00604000 rw-p 00003000 08:06 1966150                            /home/mousei7/work/Octave/octave-ML/Calling_Octave_from_Cpp/octave-stable/standalone
01681000-016c3000 rw-p 00000000 00:00 0                                  [heap]
7fa7d0000000-7fa7d0021000 rw-p 00000000 00:00 0
7fa7d0021000-7fa7d4000000 ---p 00000000 00:00 0
7fa7d6840000-7fa7d6841000 ---p 00000000 00:00 0
7fa7d6841000-7fa7d7041000 rw-p 00000000 00:00 0
7fa7d7041000-7fa7d7042000 ---p 00000000 00:00 0
7fa7d7042000-7fa7d7842000 rw-p 00000000 00:00 0
7fa7d7842000-7fa7d9842000 rw-p 00000000 00:00 0
7fa7d9842000-7fa7d9843000 ---p 00000000 00:00 0
7fa7d9843000-7fa7da043000 rw-p 00000000 00:00 0
7fa7da043000-7fa7da044000 ---p 00000000 00:00 0
7fa7da044000-7fa7da844000 rw-p 00000000 00:00 0
7fa7da844000-7fa7de844000 rw-p 00000000 00:00 0
7fa7de844000-7fa7de845000 ---p 00000000 00:00 0
7fa7de845000-7fa7df045000 rw-p 00000000 00:00 0
7fa7df045000-7fa7df046000 ---p 00000000 00:00 0
7fa7df046000-7fa7df846000 rw-p 00000000 00:00 0
7fa7df846000-7fa7df847000 ---p 00000000 00:00 0
7fa7df847000-7fa7e0047000 rw-p 00000000 00:00 0
7fa7e0047000-7fa7e0050000 r-xp 00000000 08:06 25170282                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fa7e0050000-7fa7e024f000 ---p 00009000 08:06 25170282                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fa7e024f000-7fa7e0250000 r--p 00008000 08:06 25170282                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fa7e0250000-7fa7e0251000 rw-p 00009000 08:06 25170282                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fa7e0251000-7fa7e027f000 rw-p 00000000 00:00 0
7fa7e027f000-7fa7e034e000 r-xp 00000000 08:06 14424049                   /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fa7e034e000-7fa7e054e000 ---p 000cf000 08:06 14424049                   /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fa7e054e000-7fa7e0551000 r--p 000cf000 08:06 14424049                   /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fa7e0551000-7fa7e0553000 rw-p 000d2000 08:06 14424049                   /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fa7e0553000-7fa7e0554000 rw-p 00000000 00:00 0
7fa7e0554000-7fa7e059b000 r-xp 00000000 08:06 14420034                   /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fa7e059b000-7fa7e079a000 ---p 00047000 08:06 14420034                   /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fa7e079a000-7fa7e079c000 r--p 00046000 08:06 14420034                   /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fa7e079c000-7fa7e079e000 rw-p 00048000 08:06 14420034                   /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fa7e079e000-7fa7e079f000 rw-p 00000000 00:00 0
7fa7e079f000-7fa7e07ad000 r-xp 00000000 08:06 14420026                   /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fa7e07ad000-7fa7e09ac000 ---p 0000e000 08:06 14420026                   /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fa7e09ac000-7fa7e09ad000 r--p 0000d000 08:06 14420026                   /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fa7e09ad000-7fa7e09ae000 rw-p 0000e000 08:06 14420026                   /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fa7e09ae000-7fa7e09d5000 r-xp 00000000 08:06 14420030                   /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fa7e09d5000-7fa7e0bd5000 ---p 00027000 08:06 14420030                   /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fa7e0bd5000-7fa7e0bd6000 r--p 00027000 08:06 14420030                   /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fa7e0bd6000-7fa7e0bd7000 rw-p 00028000 08:06 14420030                   /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fa7e0bd7000-7fa7e0bec000 r-xp 00000000 08:06 14420014                   /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fa7e0bec000-7fa7e0deb000 ---p 00015000 08:06 14420014                   /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fa7e0deb000-7fa7e0dec000 r--p 00014000 08:06 14420014                   /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fa7e0dec000-7fa7e0ded000 rw-p 00015000 08:06 14420014                   /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fa7e0ded000-7fa7e0e1d000 r-xp 00000000 08:06 14420022                   /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7fa7e0e1d000-7fa7e101d000 ---p 00030000 08:06 14420022                   /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7fa7e101d000-7fa7e101e000 r--p 00030000 08:06 14420022                   /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7fa7e101e000-7fa7e101f000 rw-p 00031000 08:06 14420022                   /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7fa7e101f000-7fa7e1020000 rw-p 00000000 00:00 0
7fa7e1020000-7fa7e10bf000 r-xp 00000000 08:06 14420018                   /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fa7e10bf000-7fa7e12be000 ---p 0009f000 08:06 14420018                   /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fa7e12be000-7fa7e12bf000 r--p 0009e000 08:06 14420018                   /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fa7e12bf000-7fa7e12c2000 rw-p 0009f000 08:06 14420018                   /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fa7e12c2000-7fa7e1346000 r-xp 00000000 08:06 14420038                   /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7fa7e1346000-7fa7e1545000 ---p 00084000 08:06 14420038                   /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7fa7e1545000-7fa7e1548000 r--p 00083000 08:06 14420038                   /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7fa7e1548000-7fa7e154b000 rw-p 00086000 08:06 14420038                   /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7fa7e154b000-7fa7e154c000 rw-p 00000000 00:00 0
7fa7e154c000-7fa7e1554000 r-xp 00000000 08:06 14420042                   /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fa7e1554000-7fa7e1753000 ---p 00008000 08:06 14420042                   /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fa7e1753000-7fa7e1754000 r--p 00007000 08:06 14420042                   /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fa7e1754000-7fa7e1755000 rw-p 00008000 08:06 14420042                   /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fa7e1755000-7fa7e1758000 r-xp 00000000 08:06 25170324                   /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7fa7e1758000-7fa7e1957000 ---p 00003000 08:06 25170324                   /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7fa7e1957000-7fa7e1958000 r--p 00002000 08:06 25170324                   /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7fa7e1958000-7fa7e1959000 rw-p 00003000 08:06 25170324                   /lib/x86_64-linux-gnu/libkeyutils.so.1.5
7fa7e1959000-7fa7e1960000 r-xp 00000000 08:06 14423464                   /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7fa7e1960000-7fa7e1b5f000 ---p 00007000 08:06 14423464                   /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7fa7e1b5f000-7fa7e1b60000 r--p 00006000 08:06 14423464                   /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7fa7e1b60000-7fa7e1b61000 rw-p 00007000 08:06 14423464                   /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7fa7e1b61000-7fa7e1b9e000 r-xp 00000000 08:06 14420044                   /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fa7e1b9e000-7fa7e1d9e000 ---p 0003d000 08:06 14420044                   /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fa7e1d9e000-7fa7e1d9f000 r--p 0003d000 08:06 14420044                   /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fa7e1d9f000-7fa7e1da1000 rw-p 0003e000 08:06 14420044                   /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fa7e1da1000-7fa7e1da2000 rw-p 00000000 00:00 0
7fa7e1da2000-7fa7e1dbb000 r-xp 00000000 08:06 14424013                   /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fa7e1dbb000-7fa7e1fbb000 ---p 00019000 08:06 14424013                   /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fa7e1fbb000-7fa7e1fbc000 r--p 00019000 08:06 14424013                   /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fa7e1fbc000-7fa7e1fbd000 rw-p 0001a000 08:06 14424013                   /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fa7e1fbd000-7fa7e1fd4000 r-xp 00000000 08:06 25165864                   /lib/x86_64-linux-gnu/libresolv-2.23.so
7fa7e1fd4000-7fa7e21d4000 ---p 00017000 08:06 25165864                   /lib/x86_64-linux-gnu/libresolv-2.23.so
7fa7e21d4000-7fa7e21d5000 r--p 00017000 08:06 25165864                   /lib/x86_64-linux-gnu/libresolv-2.23.so
7fa7e21d5000-7fa7e21d6000 rw-p 00018000 08:06 25165864                   /lib/x86_64-linux-gnu/libresolv-2.23.so
7fa7e21d6000-7fa7e21d8000 rw-p 00000000 00:00 0
7fa7e21d8000-7fa7e21e2000 r-xp 00000000 08:06 14422359                   /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fa7e21e2000-7fa7e23e1000 ---p 0000a000 08:06 14422359                   /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fa7e23e1000-7fa7e23e2000 r--p 00009000 08:06 14422359                   /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fa7e23e2000-7fa7e23e3000 rw-p 0000a000 08:06 14422359                   /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fa7e23e3000-7fa7e23e6000 r-xp 00000000 08:06 25170272                   /lib/x86_64-linux-gnu/libcom_err.so.2.1
7fa7e23e6000-7fa7e25e5000 ---p 00003000 08:06 25170272                   /lib/x86_64-linux-gnu/libcom_err.so.2.1
7fa7e25e5000-7fa7e25e6000 r--p 00002000 08:06 25170272                   /lib/x86_64-linux-gnu/libcom_err.so.2.1
7fa7e25e6000-7fa7e25e7000 rw-p 00003000 08:06 25170272                   /lib/x86_64-linux-gnu/libcom_err.so.2.1
7fa7e25e7000-7fa7e2613000 r-xp 00000000 08:06 14422363                   /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fa7e2613000-7fa7e2812000 ---p 0002c000 08:06 14422363                   /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fa7e2812000-7fa7e2814000 r--p 0002b000 08:06 14422363                   /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fa7e2814000-7fa7e2815000 rw-p 0002d000 08:06 14422363                   /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fa7e2815000-7fa7e2816000 rw-p 00000000 00:00 0
7fa7e2816000-7fa7e28d9000 r-xp 00000000 08:06 14422357                   /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7fa7e28d9000-7fa7e2ad9000 ---p 000c3000 08:06 14422357                   /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7fa7e2ad9000-7fa7e2ae6000 r--p 000c3000 08:06 14422357                   /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7fa7e2ae6000-7fa7e2ae8000 rw-p 000d0000 08:06 14422357                   /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7fa7e2ae8000-7fa7e2af9000 r-xp 00000000 08:06 14423499                   /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7fa7e2af9000-7fa7e2cf9000 ---p 00011000 08:06 14423499                   /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7fa7e2cf9000-7fa7e2cfa000 r--p 00011000 08:06 14423499                   /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7fa7e2cfa000-7fa7e2cfb000 rw-p 00012000 08:06 14423499                   /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1
7fa7e2cfb000-7fa7e2d54000 r-xp 00000000 08:06 14423539                   /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7fa7e2d54000-7fa7e2f53000 ---p 00059000 08:06 14423539                   /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7fa7e2f53000-7fa7e2f5d000 r--p 00058000 08:06 14423539                   /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7fa7e2f5d000-7fa7e2f5f000 rw-p 00062000 08:06 14423539                   /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0
7fa7e2f5f000-7fa7e2fde000 r-xp 00000000 08:06 14423548                   /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7fa7e2fde000-7fa7e31dd000 ---p 0007f000 08:06 14423548                   /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7fa7e31dd000-7fa7e31de000 r--p 0007e000 08:06 14423548                   /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7fa7e31de000-7fa7e31df000 rw-p 0007f000 08:06 14423548                   /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0
7fa7e31df000-7fa7e3211000 r-xp 00000000 08:06 14423394                   /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7fa7e3211000-7fa7e3410000 ---p 00032000 08:06 14423394                   /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7fa7e3410000-7fa7e3411000 r--p 00031000 08:06 14423394                   /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7fa7e3411000-7fa7e3412000 rw-p 00032000 08:06 14423394                   /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2
7fa7e3412000-7fa7e3450000 r-xp 00000000 08:06 14418009                   /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7fa7e3450000-7fa7e364f000 ---p 0003e000 08:06 14418009                   /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7fa7e364f000-7fa7e3650000 r--p 0003d000 08:06 14418009                   /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7fa7e3650000-7fa7e3651000 rw-p 0003e000 08:06 14418009                   /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
7fa7e3651000-7fa7e3676000 r-xp 00000000 08:06 25170427                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
7fa7e3676000-7fa7e3875000 ---p 00025000 08:06 25170427                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
7fa7e3875000-7fa7e3879000 r--p 00024000 08:06 25170427                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
7fa7e3879000-7fa7e387a000 rw-p 00028000 08:06 25170427                   /lib/x86_64-linux-gnu/libtinfo.so.5.9
7fa7e387a000-7fa7e56de000 r-xp 00000000 08:06 14428756                   /usr/lib/libopenblasp-r0.2.18.so
7fa7e56de000-7fa7e58dd000 ---p 01e64000 08:06 14428756                   /usr/lib/libopenblasp-r0.2.18.so
7fa7e58dd000-7fa7e58e3000 r--p 01e63000 08:06 14428756                   /usr/lib/libopenblasp-r0.2.18.so
7fa7e58e3000-7fa7e58f5000 rw-p 01e69000 08:06 14428756                   /usr/lib/libopenblasp-r0.2.18.so
7fa7e58f5000-7fa7e590e000 rw-p 00000000 00:00 0
7fa7e590e000-7fa7e5917000 r-xp 00000000 08:06 14429788                   /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1
7fa7e5917000-7fa7e5b17000 ---p 00009000 08:06 14429788                   /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1
7fa7e5b17000-7fa7e5b18000 r--p 00009000 08:06 14429788                   /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1
7fa7e5b18000-7fa7e5b19000 rw-p 0000a000 08:06 14429788                   /usr/lib/x86_64-linux-gnu/libccolamd.so.2.9.1
7fa7e5b19000-7fa7e5b22000 r-xp 00000000 08:06 14429787                   /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1
7fa7e5b22000-7fa7e5d21000 ---p 00009000 08:06 14429787                   /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1
7fa7e5d21000-7fa7e5d22000 r--p 00008000 08:06 14429787                   /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1
7fa7e5d22000-7fa7e5d23000 rw-p 00009000 08:06 14429787                   /usr/lib/x86_64-linux-gnu/libcamd.so.2.4.1
7fa7e5d23000-7fa7e5d29000 r-xp 00000000 08:06 14429789                   /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1
7fa7e5d29000-7fa7e5f28000 ---p 00006000 08:06 14429789                   /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1
7fa7e5f28000-7fa7e5f29000 r--p 00005000 08:06 14429789                   /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1
7fa7e5f29000-7fa7e5f2a000 rw-p 00006000 08:06 14429789                   /usr/lib/x86_64-linux-gnu/libcolamd.so.2.9.1
7fa7e5f2a000-7fa7e5f32000 r-xp 00000000 08:06 14429784                   /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1
7fa7e5f32000-7fa7e6131000 ---p 00008000 08:06 14429784                   /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1
7fa7e6131000-7fa7e6132000 r--p 00007000 08:06 14429784                   /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1
7fa7e6132000-7fa7e6133000 rw-p 00008000 08:06 14429784                   /usr/lib/x86_64-linux-gnu/libamd.so.2.4.1
7fa7e6133000-7fa7e614c000 r-xp 00000000 08:06 25170240                   /lib/x86_64-linux-gnu/libz.so.1.2.8
7fa7e614c000-7fa7e634b000 ---p 00019000 08:06 25170240                   /lib/x86_64-linux-gnu/libz.so.1.2.8
7fa7e634b000-7fa7e634c000 r--p 00018000 08:06 25170240                   /lib/x86_64-linux-gnu/libz.so.1.2.8
7fa7e634c000-7fa7e634d000 rw-p 00019000 08:06 25170240                   /lib/x86_64-linux-gnu/libz.so.1.2.8
7fa7e634d000-7fa7e639a000 r-xp 00000000 08:06 14420046                   /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7fa7e639a000-7fa7e6599000 ---p 0004d000 08:06 14420046                   /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7fa7e6599000-7fa7e659b000 r--p 0004c000 08:06 14420046                   /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7fa7e659b000-7fa7e659c000 rw-p 0004e000 08:06 14420046                   /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5
7fa7e659c000-7fa7e659e000 rw-p 00000000 00:00 0
7fa7e659e000-7fa7e65ab000 r-xp 00000000 08:06 14420047                   /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7fa7e65ab000-7fa7e67ab000 ---p 0000d000 08:06 14420047                   /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7fa7e67ab000-7fa7e67ac000 r--p 0000d000 08:06 14420047                   /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7fa7e67ac000-7fa7e67ad000 rw-p 0000e000 08:06 14420047                   /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5
7fa7e67ad000-7fa7e67f4000 r-xp 00000000 08:06 14422355                   /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7fa7e67f4000-7fa7e69f3000 ---p 00047000 08:06 14422355                   /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7fa7e69f3000-7fa7e69f5000 r--p 00046000 08:06 14422355                   /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7fa7e69f5000-7fa7e69f7000 rw-p 00048000 08:06 14422355                   /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2
7fa7e69f7000-7fa7e6b1a000 r-xp 00000000 08:06 14423553                   /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7fa7e6b1a000-7fa7e6d19000 ---p 00123000 08:06 14423553                   /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7fa7e6d19000-7fa7e6d24000 r--p 00122000 08:06 14423553                   /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7fa7e6d24000-7fa7e6d26000 rw-p 0012d000 08:06 14423553                   /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2
7fa7e6d26000-7fa7e6d27000 rw-p 00000000 00:00 0
7fa7e6d27000-7fa7e6d5b000 r-xp 00000000 08:06 14423398                   /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7fa7e6d5b000-7fa7e6f5a000 ---p 00034000 08:06 14423398                   /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7fa7e6f5a000-7fa7e6f5c000 r--p 00033000 08:06 14423398                   /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7fa7e6f5c000-7fa7e6f5d000 rw-p 00035000 08:06 14423398                   /usr/lib/x86_64-linux-gnu/libnettle.so.6.2
7fa7e6f5d000-7fa7e6f78000 r-xp 00000000 08:06 14421614                   /usr/lib/x86_64-linux-gnu/librtmp.so.1
7fa7e6f78000-7fa7e7177000 ---p 0001b000 08:06 14421614                   /usr/lib/x86_64-linux-gnu/librtmp.so.1
7fa7e7177000-7fa7e7178000 r--p 0001a000 08:06 14421614                   /usr/lib/x86_64-linux-gnu/librtmp.so.1
7fa7e7178000-7fa7e7179000 rw-p 0001b000 08:06 14421614                   /usr/lib/x86_64-linux-gnu/librtmp.so.1
7fa7e7179000-7fa7e71aa000 r-xp 00000000 08:06 14423445                   /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7fa7e71aa000-7fa7e73aa000 ---p 00031000 08:06 14423445                   /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7fa7e73aa000-7fa7e73ab000 r--p 00031000 08:06 14423445                   /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7fa7e73ab000-7fa7e73ac000 rw-p 00032000 08:06 14423445                   /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15
7fa7e73ac000-7fa7e73c4000 r-xp 00000000 08:06 25165847                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fa7e73c4000-7fa7e75c3000 ---p 00018000 08:06 25165847                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fa7e75c3000-7fa7e75c4000 r--p 00017000 08:06 25165847                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fa7e75c4000-7fa7e75c5000 rw-p 00018000 08:06 25165847                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fa7e75c5000-7fa7e75c9000 rw-p 00000000 00:00 0
7fa7e75c9000-7fa7e76d1000 r-xp 00000000 08:06 25165828                   /lib/x86_64-linux-gnu/libm-2.23.so
7fa7e76d1000-7fa7e78d0000 ---p 00108000 08:06 25165828                   /lib/x86_64-linux-gnu/libm-2.23.so
7fa7e78d0000-7fa7e78d1000 r--p 00107000 08:06 25165828                   /lib/x86_64-linux-gnu/libm-2.23.so
7fa7e78d1000-7fa7e78d2000 rw-p 00108000 08:06 25165828                   /lib/x86_64-linux-gnu/libm-2.23.so
7fa7e78d2000-7fa7e79fb000 r-xp 00000000 08:06 14428684                   /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7fa7e79fb000-7fa7e7bfa000 ---p 00129000 08:06 14428684                   /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7fa7e7bfa000-7fa7e7bfb000 r--p 00128000 08:06 14428684                   /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7fa7e7bfb000-7fa7e7bfd000 rw-p 00129000 08:06 14428684                   /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
7fa7e7bfd000-7fa7e7c00000 r-xp 00000000 08:06 25165862                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fa7e7c00000-7fa7e7dff000 ---p 00003000 08:06 25165862                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fa7e7dff000-7fa7e7e00000 r--p 00002000 08:06 25165862                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fa7e7e00000-7fa7e7e01000 rw-p 00003000 08:06 25165862                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fa7e7e01000-7fa7e7e6f000 r-xp 00000000 08:06 25170384                   /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7fa7e7e6f000-7fa7e806f000 ---p 0006e000 08:06 25170384                   /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7fa7e806f000-7fa7e8070000 r--p 0006e000 08:06 25170384                   /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7fa7e8070000-7fa7e8071000 rw-p 0006f000 08:06 25170384                   /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7fa7e8071000-7fa7e80ae000 r-xp 00000000 08:06 25170406                   /lib/x86_64-linux-gnu/libreadline.so.6.3
7fa7e80ae000-7fa7e82ae000 ---p 0003d000 08:06 25170406                   /lib/x86_64-linux-gnu/libreadline.so.6.3
7fa7e82ae000-7fa7e82b0000 r--p 0003d000 08:06 25170406                   /lib/x86_64-linux-gnu/libreadline.so.6.3 aborted (core dump)


Execution on gdb:
The same messages as the above are omitted

Thread 1 "standalone" received signal SIGABRT, Aborted.
0x00007ffff62f9428 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:54
54        ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff62f9428 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff62fb02a in __GI_abort () at abort.c:89
#2  0x00007ffff633b7ea in __libc_message (do_abort=do_abort@entry=2,
    fmt=fmt@entry=0x7ffff6454ed8 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff634437a in malloc_printerr (ar_ptr=<optimized out>,
    ptr=<optimized out>,
    str=0x7ffff6454f50 "free(): invalid next size (fast)", action=3)
    at malloc.c:5006
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0)
    at malloc.c:3867
#5  0x00007ffff634853c in __GI___libc_free (mem=<optimized out>)
    at malloc.c:2968
#6  0x00000000004016f9 in Array<double>::ArrayRep::~ArrayRep (this=0x60b2d0,
    __in_chrg=<optimized out>)
    at /opt/octave-stable/include/octave-4.3.0+/octave/../octave/Array.h:172
#7  Array<double>::~Array (this=0x7fffffffddc0, __in_chrg=<optimized out>)
    at /opt/octave-stable/include/octave-4.3.0+/octave/../octave/Array.h:308
#8  0x0000000000401519 in MArray<double>::~MArray (this=0x7fffffffddc0,
    __in_chrg=<optimized out>)
    at /opt/octave-stable/include/octave-4.3.0+/octave/../octave/MArray.h:83
#9  NDArray::~NDArray (this=0x7fffffffddc0, __in_chrg=<optimized out>)
---Type <return> to continue, or q <return> to quit---
    at /opt/octave-stable/include/octave-4.3.0+/octave/../octave/dNDArray.h:37
#10 Matrix::~Matrix (this=0x7fffffffddc0, __in_chrg=<optimized out>)
    at /opt/octave-stable/include/octave-4.3.0+/octave/../octave/dMatrix.h:38
#11 main () at standalone.cc:10


For embedded.cc


$ LC_ALL=C ./embedded
Segmentation fault (core dump)


Execution on gdb


Thread 1 "embedded_02" received signal SIGSEGV, Segmentation fault.
__memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:2215
2215        ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: No such file or directory.
(gdb) bt
#0  __memmove_ssse3_back ()
    at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:2215
#1  0x00007ffff572ef87 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x0000000000403734 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (__s=0x407e21 "-q", this=<optimized out>)
    at /usr/include/c++/5/bits/basic_string.h:559
#3  main () at embedded_02.cc:12


Tatsuro MATSUOKA <tmacchant>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by tmacchant (Submitted the item)
  • -email is unavailable- added by tmacchant
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-26 mtmiller Open/ClosedOpen Closed
    2018-03-26 mtmiller CategoryNone Libraries
    2018-03-24 jwe StatusNone Works For Me
    2018-03-24 tmacchant Carbon-Copy- Added andrea.delbravo <andrea.delbravo@leonardocompany.com>

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code