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

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

[Octave-bug-tracker] [bug #63300] valgrind warning from inv.cc


From: Robert Jenssen
Subject: [Octave-bug-tracker] [bug #63300] valgrind warning from inv.cc
Date: Wed, 2 Nov 2022 18:15:38 -0400 (EDT)

Follow-up Comment #5, bug #63300 (project octave):


$ gdb /usr/local/octave-8.0.0/bin/octave-cli
GNU gdb (GDB) Fedora 12.1-2.fc36
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/octave-8.0.0/bin/octave-cli...
(gdb) b inv.cc:173
No source file named inv.cc.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (inv.cc:173) pending.
(gdb) r
Starting program: /usr/local/octave-8.0.0/bin/octave-cli 

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.fedoraproject.org/ 
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe49ff640 (LWP 3593986)]
GNU Octave, version 8.0.0
Copyright (C) 1993-2022 The Octave Project Developers.
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-pc-linux-gnu".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

octave:1> gloptipolydemo

+ echo on
+ % Short demo of Gloptipoly 3
+ %
+ % Consider the classical problem of minimizing globally the
+ % two-dimensional six-hump camel back function 
+ %
+ % min g0(x) = 4x1^2+x1x2-4x2^2-2.1x1^4+4x2^4+x1^6/3 
+ %
+ % The function has six local minima, two of them being global minima.
+ %
+ % This optimization problem can be modeled as a moment
+ % problem as follows.
+ %
+ % First we define the variables
+ % and the polynomial to be minimized
+ 
+ mpol x1 x2
+ g0 = 4*x1^2+x1*x2-4*x2^2-2.1*x1^4+4*x2^4+x1^6/3

Thread 1 "octave-cli" hit Breakpoint 1, octave::Finv (args=..., nargout=1) at
../octave/libinterp/corefcn/inv.cc:173
173                   result = m.inverse (mattyp, info, rcond, true, true);
(gdb) b Matrix::inverse
Breakpoint 2 at 0x7ffff5d34cf0 (9 locations)
(gdb) p info
$1 = 140737272305312
(gdb) c
Continuing.

Thread 1 "octave-cli" hit Breakpoint 2, 0x00007ffff6ec2c60 in
Matrix::inverse(MatrixType&, long&, double&, bool, bool) const@plt () from
/usr/local/octave-8.0.0/lib/octave/8.0.0/liboctinterp.so.10
(gdb) 
Continuing.

Thread 1 "octave-cli" hit Breakpoint 2, Matrix::inverse (this=0x7fffffffa940,
mattype=..., info=@0x7fffffffaa08: 140737272305312, rcon=@0x7fffffffaa00: 0,
force=true, calc_cond=true) at ../octave/liboctave/array/dMatrix.cc:637
637       int typ = mattype.type (false);
(gdb) p info
$2 = (octave_idx_type &) @0x7fffffffaa08: 140737272305312
(gdb) n
638       Matrix ret;
(gdb) 
640       if (typ == MatrixType::Unknown)
(gdb) 
643       if (typ == MatrixType::Diagonal)  // a scalar is classified as
Diagonal.
(gdb) 
645           ret = 1 / (*this);
(gdb) 
646           if (calc_cond)
(gdb) 
648               double scalar = this->elem (0);
(gdb) 
649               if (octave::math::isfinite (scalar) && scalar != 0)
(gdb) 
650                 rcon = 1.0;
(gdb) 
684       return ret;
(gdb) 
685     }
(gdb) 
octave::Finv (args=..., nargout=1) at ../octave/libinterp/corefcn/inv.cc:174
174                   args(0).matrix_type (mattyp);
(gdb) p info
$3 = 140737272305312
(gdb) n
175                 }
(gdb) 
202       octave_value_list retval (nargout > 1 ? 2 : 1);
(gdb) 
204       retval(0) = result;
(gdb) 
205       if (nargout > 1)
(gdb) 
208       if (nargout < 2)
(gdb) 
212           if (isfloat)
(gdb) 
216             is_singular = ((rcond + 1.0 == 1.0) || octave::math::isnan
(rcond))
(gdb) 
217                           && ! arg.is_scalar_type ();
(gdb) 
216             is_singular = ((rcond + 1.0 == 1.0) || octave::math::isnan
(rcond))
(gdb) 
216             is_singular = ((rcond + 1.0 == 1.0) || octave::math::isnan
(rcond))
(gdb) 
219           if (info == -1 || is_singular)
(gdb) p info
$4 = 140737272305312
(gdb) 




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63300>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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