3.1.52 glibc detected *** octave: double free or corruption
Jaroslav Hajek
highegg at gmail.com
Mon Feb 16 03:53:14 CST 2009
On Thu, Feb 12, 2009 at 12:26 AM, Michael D. Godfrey
<godfrey at isl.stanford.edu> wrote:
> The attached program fails with:
> *** glibc detected *** octave: double free or corruption (!prev):
> 0x00007f6dee20eb80 ***
> ======= Backtrace: =========
> /lib64/libc.so.6[0x370e077ec8]
> /lib64/libc.so.6(cfree+0x76)[0x370e07a486]
> /usr/local/lib/octave-3.1.52/liboctave.so(_ZN5ArrayISt7complexIdEED2Ev+0x65)[0x7f6df6b29a45]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN21octave_complex_matrixD0Ev+0x38)[0xbe3fd8]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN17octave_base_value14numeric_assignERKSsRKSt4listI17octave_value_listSaIS3_EERK12octave_value+0x2c7)[0xbb7bb7]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN18octave_base_matrixI7NDArrayE8subsasgnERKSsRKSt4listI17octave_value_listSaIS5_EERK12octave_value+0x211)[0xbd5b21]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN12octave_value8subsasgnERKSsRKSt4listI17octave_value_listSaIS3_EERKS_+0xd)[0xc29e9d]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN12octave_value6assignENS_9assign_opERKSsRKSt4listI17octave_value_listSaIS4_EERKS_+0xce)[0xc36b0e]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN13octave_lvalue6assignEN12octave_value9assign_opERKS0_+0x29)[0xb15649]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN22tree_simple_assignment7rvalue1Ei+0x3f2)[0xd97852]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator15visit_statementER14tree_statement+0x173)[0xda42d3]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator20visit_statement_listER19tree_statement_list+0x53)[0xda1723]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator24visit_simple_for_commandER23tree_simple_for_command+0x2cd)[0xda35fd]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator15visit_statementER14tree_statement+0x6c)[0xda41cc]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator20visit_statement_listER19tree_statement_list+0x53)[0xda1723]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator24visit_simple_for_commandER23tree_simple_for_command+0x2cd)[0xda35fd]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator15visit_statementER14tree_statement+0x6c)[0xda41cc]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator20visit_statement_listER19tree_statement_list+0x53)[0xda1723]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN18octave_user_script17do_multi_index_opEiRK17octave_value_list+0x166)[0xc84756]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN12octave_value17do_multi_index_opEiRK17octave_value_list+0xd)[0xc29e7d]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN15tree_identifier6rvalueEi+0x5a4)[0xdab884]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN15tree_identifier7rvalue1Ei+0x3e)[0xdab1be]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator15visit_statementER14tree_statement+0x173)[0xda42d3]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_ZN14tree_evaluator20visit_statement_listER19tree_statement_list+0x53)[0xda1723]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(_Z9main_loopv+0x1f4)[0xb74a74]
> /usr/local/lib/octave-3.1.52/liboctinterp.so(octave_main+0xefd)[0xb124ad]
> /lib64/libc.so.6(__libc_start_main+0xe6)[0x370e01e576]
> octave[0x4007c9]
> ======= Memory map: ========
> 00110000-00193000 r-xp 00000000 fd:00 3646991
> /usr/local/lib/octave-3.1.52/libcruft.so.3.1.52
> 00193000-00392000 ---p 00083000 fd:00 3646991
> /usr/local/lib/octave-3.1.52/libcruft.so.3.1.52
> 00392000-00395000 rw-p 00082000 fd:00 3646991
> /usr/local/lib/octave-3.1.52/libcruft.so.3.1.52
> 00395000-00396000 rw-p 00395000 00:00 0
> 00400000-00401000 r-xp 00000000 fd:00 3081564
> /usr/local/bin/octave-3.1.52
> 00600000-00601000 rw-p 00000000 fd:00 3081564
> /usr/local/bin/octave-3.1.52
> 00601000-01333000 r-xp 00000000 fd:00 3647656
> /usr/local/lib/octave-3.1.52/liboctinterp.so.3.1.52
> 01333000-01533000 ---p 00d32000 fd:00 3647656
> /usr/local/lib/octave-3.1.52/liboctinterp.so.3.1.52
> 01533000-01588000 rw-p 00d32000 fd:00 3647656
> /usr/local/lib/octave-3.1.52/liboctinterp.so.3.1.52
> 01588000-0158c000 rw-p 01588000 00:00 0
> 0158c000-01591000 r-xp 00000000 fd:00 2375994
> /usr/lib64/libXfixes.so.3.1.0
> 01591000-01790000 ---p 00005000 fd:00 2375994
> /usr/lib64/libXfixes.so.3.1.0
> 01790000-01791000 rw-p 00004000 fd:00 2375994
> /usr/lib64/lpanic: Aborted -- stopping myself...
> APC = 1 + 1i
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
> Abort
> [vzero:demod]
> ==================================================
> Octave 3.0.3 runs this OK. And, see line 50 of the program for the exact
> problem variable DCK complex fails, DCK real is OK.
> The version of 3.1.52 is from Feb 10.
>
>
>
>
> % Read parameters and data:
> % inpt
> NT = [159 0 0 1 0 144 0 1 1];
> MT = [19 1 4 0 0 0];
> A = [1.57 -0.7 0. 0. 0. 18.];
> B = [0. 0.07 0.06 0. 0. 0.];
> NL = [6];
> NF = [41];
> ITR = [1];
> NFR = [320];
> NXF = [0];
> % $end
> data_title= "gmdata";
> %(10F7.1)
> DI = [1512.8 1891.0 1701.9 1512.8 1512.8 1323.7 2080.1 1891.0 2836.5 2080.1\
> 2269.2 3403.8 1701.9 2458.3 3403.8 3025.6 3214.7 4349.3 2647.4 3592.9\
> 3782.0 2647.4 2269.2 2269.2 1134.6 945.5 2269.2 2269.2 2836.5 3403.8\
> 3782.0 3592.9 3782.0 3403.8 4160.2 3403.8 3025.6 3592.9 4349.3 3592.9\
> 3592.9 3782.0 3782.0 4160.2 6240.3 4349.3 5673.0 5483.9 6996.7 3971.1\
> 5673.0 3971.1 4916.6 5483.9 3214.7 5673.0 5294.8 5105.7 3214.7 4160.2\
> 2269.2 2458.3 1323.7 5483.9 4727.5 4727.5 4538.4 4727.5 4538.4 3592.9\
> 4160.2 3592.9 4160.2 3971.1 4160.2 3214.7 3971.1 3403.8 3403.8 4349.3\
> 5673.0 5105.7 5673.0 5862.1 5294.8 4916.6 6807.6 4160.2 5673.0 4727.5\
> 4349.3 4160.2 4160.2 2269.2 2269.2 2269.2 1134.6 945.5 567.3 3025.6\
> 3025.6 4538.4 3592.9 5673.0 5105.7 4727.5 6240.3 3592.9 4160.2 3971.1\
> 4538.4 3971.1 4538.4 4727.5 4916.6 5483.9 7185.8 6051.2 6240.3 7753.1\
> 5673.0 7374.9 9455.0 5483.9 6429.4 5673.0 4538.4 4349.3 5673.0 4727.5\
> 5105.7 4349.3 2647.4 1512.8 7185.8 5673.0 3025.6 2269.2 2269.2 4538.4\
> 4727.5 5673.0 5673.0 6240.3 4538.4 6051.2 5862.1 5862.1 6240.3 4727.5\
> 6807.6 7942.2 8509.5 7564.0 6996.7 8698.6 6429.4 6807.6 7942.2];
>
> maxfreq = 20;
> maxlength= 200;
> DC = zeros(maxfreq,maxlength,3);
> complex(DC);
> %WF = setw(MT(1));
> WF =zeros(MT(1),1);
> WF(:) = 1;
> DT = DI;
> NT(2)=NT(6);
> NTF=NT(2)+NF;
> NT(7)=NT(6)-NT(4);
> MT(5)=(MT(1)-1)*MT(2);
>
> for k = 1:MT(1)
>
> AF = -(k-1)/(MT(1)-1);
> DCK = complex(1.,1.); % exp(complex(0.,pi*AF));
> % ***** if DCK above is replaced by DCK = 1; program runs OK
> APC = DCK
> for j = 1:NTF
> DC(k,j,1)=2.;
> DC(k,j,2) = DC(k,j,2)+DC(k,j,1)*APC*WF(k);
> APC = APC*DCK;
> endfor
> endfor
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave
>
>
A fix is uploaded to Savannah:
http://hg.savannah.gnu.org/hgweb/octave/rev/c141078e083a
cheers
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Bug-octave
mailing list