[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave allocator patch
From: |
Michael Goffioul |
Subject: |
Re: octave allocator patch |
Date: |
Mon, 7 Nov 2011 08:27:56 +0000 |
On Mon, Nov 7, 2011 at 8:22 AM, John W. Eaton <address@hidden> wrote:
> (gdb) up
> #5 0x00007ffff70febdf in symbol_table::fcn_info::~fcn_info (this=0x276c788,
> __in_chrg=<optimized out>) at /home/jwe/src/octave/src/symtab.h:769
> 769 delete rep;
> (gdb) p rep
> $1 = (symbol_table::fcn_info::fcn_info_rep *) 0x26ec840
> (gdb) p *rep
> $2 = {
> name = {
> static npos = <optimized out>,
> _M_dataplus = {
> <std::allocator<char>> = {
> <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
> fields>},
> members of std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::_Alloc_hider:
> _M_p = 0x26b88b8 "afun"
> }
> },
>
> Searching for afun in the sources turns up:
>
> ./scripts/sparse/bicgstab.m:%!function y = afun (x, a)
> ./scripts/sparse/bicgstab.m:%! [x, flag, relres, iter, resvec] = bicgstab
> (@(x) afun (x, A), b,
>
> I checked in the following changeset and it seems to have fixed the
> crashes for me. Does this also fix the problem for you?
>
> http://hg.savannah.gnu.org/hgweb/octave/rev/2c80bbd87f5d
It's exactly the same problem I had. Your change fixed the crash at
the time. However, making the parser to use shared_ptr instead also
fixed the issue, without changing the test code.
Michael.