[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31032] C++ function crashes 64 bit Octave, bu
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #31032] C++ function crashes 64 bit Octave, but not 32 bit. |
Date: |
Tue, 14 Sep 2010 12:31:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; da-DK; rv:1.9.2.7) Gecko/20100723 Fedora/3.6.7-1.fc13 Firefox/3.6.7 |
URL:
<http://savannah.gnu.org/bugs/?31032>
Summary: C++ function crashes 64 bit Octave, but not 32 bit.
Project: GNU Octave
Submitted by: None
Submitted on: Tue 14 Sep 2010 12:31:14 PM UTC
Category: None
Severity: 3 - Normal
Item Group: Crash
Status: None
Assigned to: None
Originator Name:
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.4
Operating System: GNU/Linux
_______________________________________________________
Details:
The following code is a stripped down example "test64.cc":
#include <octave/oct.h>
DEFUN_DLD (test64, args, ,
"\n")
{
const int L = args(0).int_value();
Matrix g(L,1);
return octave_value (g);
}
I compile using "mkoctfile test64.cc"
On 32 bit Linux (Ubuntu with Octave 3.2.3) this works perfectly fine,
"test64(20)" return a vector of random garbage, and up until know this code
has always worked.
It also workd on Octave 3.2.4 on WinXP.
On 64 bit Fedora, Octave 3.2.4 I get an immidiate crash:
address@hidden ~]$ octave --no-init-file
GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "x86_64-redhat-linux-gnu".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Report bugs to <address@hidden> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
For information about changes from previous versions, type `news'.
warning: mark_as_command is obsolete and will be removed from a future
version of Octave
octave:1> test64(20)
*** glibc detected *** octave: free(): invalid pointer: 0x00007f905f518f30
***
======= Backtrace: =========
/lib64/libc.so.6[0x34ca675676]
/usr/lib64/octave-3.2.4/liboctinterp.so(_ZN21tree_index_expression7rvalue1Ei+0x9e)[0x7f905ed1db7e]
/usr/lib64/octave-3.2.4/liboctinterp.so(_ZN14tree_evaluator15visit_statementER14tree_statement+0x106)[0x7f905ed11636]
/usr/lib64/octave-3.2.4/liboctinterp.so(_ZN14tree_evaluator20visit_statement_listER19tree_statement_list+0x58)[0x7f905ed0e658]
/usr/lib64/octave-3.2.4/liboctinterp.so(_Z9main_loopv+0x14e)[0x7f905eb42bce]
/usr/lib64/octave-3.2.4/liboctinterp.so(octave_main+0xf37)[0x7f905ead8367]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x34ca61ec5d]
octave[0x4007f9]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:00 270192
/usr/bin/octave-3.2.4
00600000-00601000 rw-p 00000000 fd:00 270192
/usr/bin/octave-3.2.4
0189a000-02073000 rw-p 00000000 00:00 0
[heap]
34ca000000-34ca01e000 r-xp 00000000 fd:00 418
/lib64/ld-2.12.so
34ca21e000-34ca21f000 r--p 0001e000 fd:00 418
/lib64/ld-2.12.so
34ca21f000-34ca220000 rw-p 0001f000 fd:00 418
/lib64/ld-2.12.so
34ca220000-34ca221000 rw-p 00000000 00:00 0
34ca400000-34ca401000 r-xp 00000000 fd:00 298019
/usr/lib64/nvidia/tls/libnvidia-tls.so.195.36.31
34ca401000-34ca501000 ---p 00001000 fd:00 298019
/usr/lib64/nvidia/tls/libnvidia-tls.so.195.36.31
34ca501000-34ca502000 rw-p 00001000 fd:00 298019
/usr/lib64/nvidia/tls/libnvidia-tls.so.195.36.31
34ca600000-34ca775000 r-xp 00000000 fd:00 1496
/lib64/libc-2.12.so
34ca775000-34ca975000 ---p 00175000 fd:00 1496
/lib64/libc-2.12.so
34ca975000-34ca979000 r--p 00175000 fd:00 1496
/lib64/libc-2.12.so
34ca979000-34ca97a000 rw-p 00179000 fd:00 1496
/lib64/libc-2.12.so
34ca97a000-34ca97f000 rw-p 00000000 00:00 0
34caa00000-34caa83000 r-xp 00000000 fd:00 2465
/lib64/libm-2.12.so
34caa83000-34cac82000 ---p 00083000 fd:00 2465
/lib64/libm-2.12.so
34cac82000-34cac83000 r--p 00082000 fd:00 2465
/lib64/libm-2.12.so
34cac83000-34cac84000 rw-p 00083000 fd:00 2465
/lib64/libm-2.12.so
34cae00000-34cae17000 r-xp 00000000 fd:00 1533
/lib64/libpthread-2.12.so
34cae17000-34cb016000 ---p 00017000 fd:00 1533
/lib64/libpthread-2.12.so
34cb016000-34cb017000 r--p 00016000 fd:00 1533
/lib64/libpthread-2.12.so
34cb017000-34cb018000 rw-p 00017000 fd:00 1533
/lib64/libpthread-2.12.so
34cb018000-34cb01c000 rw-p 00000000 00:00 0
34cb200000-34cb2f8000 r-xp 00000000 fd:00 272739
/usr/lib64/libfftw3.so.3.2.4
34cb2f8000-34cb4f7000 ---p 000f8000 fd:00 272739
/usr/lib64/libfftw3.so.3.2.4
34cb4f7000-34cb4fe000 rw-p 000f7000 fd:00 272739
/usr/lib64/libfftw3.so.3.2.4
34cb600000-34cb615000 r-xp 00000000 fd:00 2571
/lib64/libz.so.1.2.3
34cb615000-34cb814000 ---p 00015000 fd:00 2571
/lib64/libz.so.1.2.3
34cb814000-34cb815000 rw-p 00014000 fd:00 2571
/lib64/libz.so.1.2.3
34cd600000-34cd61b000 r-xp 00000000 fd:00 301694
/usr/lib64/libxcb.so.1.1.0
34cd61b000-34cd81a000 ---p 0001b000 fd:00 301694
/usr/lib64/libxcb.so.1.1.0
34cd81a000-34cd81b000 rw-p 0001a000 fd:00 301694
/usr/lib64/libxcb.so.1.1.0
34cda00000-34cdb39000 r-xp 00000000 fd:00 301697
/usr/lib64/libX11.so.6.3.0
34cdb39000-34cdd39000 ---p 00139000 fd:00 301697
/usr/lib64/libX11.so.6.3.0
34cdd39000-34cdd3f000 rw-p 00139000 fd:00 301697
/usr/lib64/libX11.so.6.3.0
34cde00000-34cde02000 r-xp 00000000 fd:00 301693
/usr/lib64/libXau.so.6.0.0
34cde02000-34ce002000 ---p 00002000 fd:00 301693
/usr/lib64/libXau.so.6.0.0
34ce002000-34ce003000 rw-p 00002000 fd:00 301693
/usr/lib64/libXau.so.6.0.0
34cee00000-34cee97000 r-xp 00000000 fd:00 301685
/usr/lib64/libfreetype.so.6.3.22
34cee97000-34cf096000 ---p 00097000 fd:00 301685
/usr/lib64/libfreetype.so.6.3.22
34cf096000-34cf09c000 rw-p 00096000 fd:00 301685
/usr/lib64/libfreetype.so.6.3.22
34cf200000-34cf23b000 r-xp 00000000 fd:00 2000
/lib64/libreadline.so.6.1
34cf23b000-34cf43b000 ---p 0003b000 fd:00 2000
/lib64/libreadline.so.6.1
34cf43b000-34cf443000 rw-p 0003b000 fd:00 2000
/lib64/libreadline.so.6.1
34cf443000-34cf444000 rw-p 00000000 00:00 0
34d4600000-34d4616000 r-xp 00000000 fd:00 1903
/lib64/libgcc_s-4.4.4-20100630.so.1
34d4616000-34d4815000 ---p 00016000 fd:00 1903
/lib64/libgcc_s-4.4.4-20100630.so.1
34d4815000-34d4816000 rw-p 00015000 fd:00 1903
/lib64/libgcc_s-4.4.4-20100630.so.1
34d5200000-34d52e9000 r-xp 00000000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d52e9000-34d54e9000 ---p 000e9000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d54e9000-34d54f0000 r--p 000e9000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d54f0000-34d54f2000 rw-p 000f0000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d54f2000-34d5507000 rw-p 00000000 00:00 0
34d8200000-34d8222000 r-xp 00000000 fd:00 2985
/lib64/libncurses.so.5.7
34d8222000-34d8422000 ---p 00022000 fd:00 2985
/lib64/libncurses.so.5.7
34d8422000-34d8423000 rw-p 00022000 fd:00 2985
/lib64/libncurses.so.5.7
34d9600000-34d962d000 r-xp 00000000 fd:00 1974
/lib64/libpcre.so.0.0.1
34d962d000-34d982c000 ---p 0002d000 fd:00 1974
/lib64/libpcre.so.0.0.1
34d982c000-34d982d000 rw-p 0002c000 fd:00 1974
/lib64/libpcre.so.0.0.1
34dae00000-34dae24000 r-xp 00000000 fd:00 2611
/lib64/libtinfo.so.5.7
34dae24000-34db023000 ---p 00024000 fd:00 2611
/lib64/libtinfo.so.5.7
34db023000-34db028000 rw-p 00023000 fd:00 2611
/lib64/libtinfo.so.5.7
34e6800000-34e7c58000 r-xp 00000000 fd:00 269764
/usr/lib64/nvidia/libGLcore.so.195.36.31panic: Aborted -- stopping myself...
attempting to save variables to `octave-core'...
*** glibc detected *** octave: free(): invalid pointer: 0x00007f905f518f30
***
======= Backtrace: =========
/lib64/libc.so.6[0x34ca675676]
/usr/lib64/octave-3.2.4/liboctinterp.so(+0x4020fc)[0x7f905ea230fc]
/usr/lib64/octave-3.2.4/liboctinterp.so(_Z16dump_octave_corev+0x20b)[0x7f905ea23c3b]
/usr/lib64/octave-3.2.4/liboctinterp.so(+0x4ef92b)[0x7f905eb1092b]
/lib64/libpthread.so.0[0x34cae0f440]
/lib64/libc.so.6(gsignal+0x35)[0x34ca6329a5]
/lib64/libc.so.6(abort+0x175)[0x34ca634185]
/lib64/libc.so.6[0x34ca66fd5b]
/lib64/libc.so.6[0x34ca675676]
/usr/lib64/octave-3.2.4/liboctinterp.so(_ZN21tree_index_expression7rvalue1Ei+0x9e)[0x7f905ed1db7e]
/usr/lib64/octave-3.2.4/liboctinterp.so(_ZN14tree_evaluator15visit_statementER14tree_statement+0x106)[0x7f905ed11636]
/usr/lib64/octave-3.2.4/liboctinterp.so(_ZN14tree_evaluator20visit_statement_listER19tree_statement_list+0x58)[0x7f905ed0e658]
/usr/lib64/octave-3.2.4/liboctinterp.so(_Z9main_loopv+0x14e)[0x7f905eb42bce]
/usr/lib64/octave-3.2.4/liboctinterp.so(octave_main+0xf37)[0x7f905ead8367]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x34ca61ec5d]
octave[0x4007f9]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:00 270192
/usr/bin/octave-3.2.4
00600000-00601000 rw-p 00000000 fd:00 270192
/usr/bin/octave-3.2.4
0189a000-02073000 rw-p 00000000 00:00 0
[heap]
34ca000000-34ca01e000 r-xp 00000000 fd:00 418
/lib64/ld-2.12.so
34ca21e000-34ca21f000 r--p 0001e000 fd:00 418
/lib64/ld-2.12.so
34ca21f000-34ca220000 rw-p 0001f000 fd:00 418
/lib64/ld-2.12.so
34ca220000-34ca221000 rw-p 00000000 00:00 0
34ca400000-34ca401000 r-xp 00000000 fd:00 298019
/usr/lib64/nvidia/tls/libnvidia-tls.so.195.36.31
34ca401000-34ca501000 ---p 00001000 fd:00 298019
/usr/lib64/nvidia/tls/libnvidia-tls.so.195.36.31
34ca501000-34ca502000 rw-p 00001000 fd:00 298019
/usr/lib64/nvidia/tls/libnvidia-tls.so.195.36.31
34ca600000-34ca775000 r-xp 00000000 fd:00 1496
/lib64/libc-2.12.so
34ca775000-34ca975000 ---p 00175000 fd:00 1496
/lib64/libc-2.12.so
34ca975000-34ca979000 r--p 00175000 fd:00 1496
/lib64/libc-2.12.so
34ca979000-34ca97a000 rw-p 00179000 fd:00 1496
/lib64/libc-2.12.so
34ca97a000-34ca97f000 rw-p 00000000 00:00 0
34caa00000-34caa83000 r-xp 00000000 fd:00 2465
/lib64/libm-2.12.so
34caa83000-34cac82000 ---p 00083000 fd:00 2465
/lib64/libm-2.12.so
34cac82000-34cac83000 r--p 00082000 fd:00 2465
/lib64/libm-2.12.so
34cac83000-34cac84000 rw-p 00083000 fd:00 2465
/lib64/libm-2.12.so
34cae00000-34cae17000 r-xp 00000000 fd:00 1533
/lib64/libpthread-2.12.so
34cae17000-34cb016000 ---p 00017000 fd:00 1533
/lib64/libpthread-2.12.so
34cb016000-34cb017000 r--p 00016000 fd:00 1533
/lib64/libpthread-2.12.so
34cb017000-34cb018000 rw-p 00017000 fd:00 1533
/lib64/libpthread-2.12.so
34cb018000-34cb01c000 rw-p 00000000 00:00 0
34cb200000-34cb2f8000 r-xp 00000000 fd:00 272739
/usr/lib64/libfftw3.so.3.2.4
34cb2f8000-34cb4f7000 ---p 000f8000 fd:00 272739
/usr/lib64/libfftw3.so.3.2.4
34cb4f7000-34cb4fe000 rw-p 000f7000 fd:00 272739
/usr/lib64/libfftw3.so.3.2.4
34cb600000-34cb615000 r-xp 00000000 fd:00 2571
/lib64/libz.so.1.2.3
34cb615000-34cb814000 ---p 00015000 fd:00 2571
/lib64/libz.so.1.2.3
34cb814000-34cb815000 rw-p 00014000 fd:00 2571
/lib64/libz.so.1.2.3
34cd600000-34cd61b000 r-xp 00000000 fd:00 301694
/usr/lib64/libxcb.so.1.1.0
34cd61b000-34cd81a000 ---p 0001b000 fd:00 301694
/usr/lib64/libxcb.so.1.1.0
34cd81a000-34cd81b000 rw-p 0001a000 fd:00 301694
/usr/lib64/libxcb.so.1.1.0
34cda00000-34cdb39000 r-xp 00000000 fd:00 301697
/usr/lib64/libX11.so.6.3.0
34cdb39000-34cdd39000 ---p 00139000 fd:00 301697
/usr/lib64/libX11.so.6.3.0
34cdd39000-34cdd3f000 rw-p 00139000 fd:00 301697
/usr/lib64/libX11.so.6.3.0
34cde00000-34cde02000 r-xp 00000000 fd:00 301693
/usr/lib64/libXau.so.6.0.0
34cde02000-34ce002000 ---p 00002000 fd:00 301693
/usr/lib64/libXau.so.6.0.0
34ce002000-34ce003000 rw-p 00002000 fd:00 301693
/usr/lib64/libXau.so.6.0.0
34cee00000-34cee97000 r-xp 00000000 fd:00 301685
/usr/lib64/libfreetype.so.6.3.22
34cee97000-34cf096000 ---p 00097000 fd:00 301685
/usr/lib64/libfreetype.so.6.3.22
34cf096000-34cf09c000 rw-p 00096000 fd:00 301685
/usr/lib64/libfreetype.so.6.3.22
34cf200000-34cf23b000 r-xp 00000000 fd:00 2000
/lib64/libreadline.so.6.1
34cf23b000-34cf43b000 ---p 0003b000 fd:00 2000
/lib64/libreadline.so.6.1
34cf43b000-34cf443000 rw-p 0003b000 fd:00 2000
/lib64/libreadline.so.6.1
34cf443000-34cf444000 rw-p 00000000 00:00 0
34d4600000-34d4616000 r-xp 00000000 fd:00 1903
/lib64/libgcc_s-4.4.4-20100630.so.1
34d4616000-34d4815000 ---p 00016000 fd:00 1903
/lib64/libgcc_s-4.4.4-20100630.so.1
34d4815000-34d4816000 rw-p 00015000 fd:00 1903
/lib64/libgcc_s-4.4.4-20100630.so.1
34d5200000-34d52e9000 r-xp 00000000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d52e9000-34d54e9000 ---p 000e9000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d54e9000-34d54f0000 r--p 000e9000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d54f0000-34d54f2000 rw-p 000f0000 fd:00 265856
/usr/lib64/libstdc++.so.6.0.13
34d54f2000-34d5507000 rw-p 00000000 00:00 0
34d8200000-34d8222000 r-xp 00000000 fd:00 2985
/lib64/libncurses.so.5.7
34d8222000-34d8422000 ---p 00022000 fd:00 2985
/lib64/libncurses.so.5.7
34d8422000-34d8423000 rw-p 00022000 fd:00 2985
/lib64/libncurses.so.5.7
34d9600000-34d962d000 r-xp 00000000 fd:00 1974
/lib64/libpcre.so.0.0.1
34d962d000-34d982c000 ---p 0002d000 fd:00 1974
/lib64/libpcre.so.0.0.1
34d982c000-34d982d000 rw-p 0002c000 fd:00 1974
/lib64/libpcre.so.0.0.1
34dae00000-34dae24000 r-xp 00000000 fd:00 2611
/lib64/libtinfo.so.5.7
34dae24000-34db023000 ---p 00024000 fd:00 2611
/lib64/libtinfo.so.5.7
34db023000-34db028000 rw-p 00023000 fd:00 2611
/lib64/libtinfo.so.5.7
34e6800000-34e7c58000 r-xp 00000000 fd:00 269764
/usr/lib64/nvidia/libGLcore.so.195.36.31panic: attempted clean up apparently
failed -- aborting...
Afbrudt (SIGABRT) (core dumped)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31032>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #31032] C++ function crashes 64 bit Octave, but not 32 bit.,
anonymous <=