bugGNU Octave - Bugs: bug #61583, [octave forge] (tisean) Remove...

 
 

bug #61583: [octave forge] (tisean) Remove usage of "error_state"

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Mon 29 Nov 2021 01:07:09 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Ready For Test Assigned to:  lostbard
Originator Name:  Open/Closed:  * Open
Release:  * dev Release: 
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 06 Apr 2025 09:22:31 PM UTC, comment #13: 

Even "Rosenstein"

Dmitri A. Sergatskov <dasergatskov>
Sun 06 Apr 2025 09:21:36 PM UTC, comment #12: 

The more I look at this code the more problem I find. E.g. a couple typos in "lyap_r.m":

## the algorithm described by Resentein et al. on the TISEAN refernce page:


"Rosenstain"
M. T. Rosenstein, J. J. Collins, C. J. De Luca, A practical method for calculating largest Lyapunov exponents from small data sets, Physica D 65, 117 (1993).

and "reference" (or should it be "references"?)

Anyway those are beyond the scope of this bug report. I will make  a new one (or two).

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 05 Apr 2025 10:59:00 AM UTC, comment #11: 

I think most (if not all) of 33 failures is due to the fact that "hanon" map results (that used as input for many tests) are very sensitive to compiler settings. I suspect the original "reference" data were obtained on Tru64. I actually downloaded binaries for both x86 and amd64 and their results are different
and are not the same as reference data in those tests.

I also tried to compile "__henon__.cc" to quadprecision (which I think is a good idea for this function in general), and the results are different yet again.

So I do not have a good idea whatto do with the failing tests. May be just delete them.

Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Fri 04 Apr 2025 04:53:04 AM UTC, comment #10: 

Also, compiling with ASAN:

  ..ri/.local/share/octave/api-v60/packages/tisean-0.2.4/lyap_r.m =================================================================
==669628==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7c1bbf9b4f68 at pc 0x7bfaa4e36cde bp 0x7bfa9da1c8d0 sp 0x7bfa9da1c8c8
READ of size 8 at 0x7c1bbf9b4f68 thread T10 (QThread)
    #0 0x7bfaa4e36cdd in F__lyap_r__(octave_value_list const&, int) /tmp/oct-FMgS89/tisean-0.2.4/src/__lyap_r__.cc:173:48
    #1 0x7ffbc7fb869d in octave::tree_evaluator::execute_builtin_function(octave_builtin&, int, octave_value_list const&) /home/dmitri/src/dev/octave/clang_asan/../libinterp/parse-tree/pt-eval.cc:3551:14


Full log is attached.

(file asan_tisean.txt)

Dmitri.
--


(file #57102)

Dmitri A. Sergatskov <dasergatskov>
Fri 04 Apr 2025 12:50:03 AM UTC, comment #9: 

Installing hg heads for both signal and tisean with clang and
"-Og -fsanitize=underfine" flags.

During compile:

__d2__.cc:75:36: warning: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
   75 |     rz[i]=(double)(rnd=rnd*rndf+1)/std::numeric_limits<unsigned long>::max ();
      |                                   ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__d2__.cc:197:13: warning: absolute value function 'abs' given an argument of type 'octave_idx_type' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
  197 |         if (abs(element-n1) > MINDIST)
      |             ^
__d2__.cc:197:13: note: use function 'std::abs' instead
  197 |         if (abs(element-n1) > MINDIST)
      |             ^~~
      |             std::abs


The tests fail with:

Summary:

  PASS                              129
  FAIL                               33


But I think this is mostly due to problems with "signal" package it relies upon.

https://octave.discourse.group/t/pkg-test-signal-fails-with-ubsan/6395

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Thu 03 Apr 2025 09:05:18 PM UTC, comment #8: 

Version 0.2.4 of Tisean was installed under Windows 10,
But "pkg test tisean" crashed Octave 10.0.90 (both GUI and CLI)

In Ubuntu I got:

g++ -std=gnu++17 -c  -fPIC -I/usr/local/include/octave-10.0.90/octave/.. -I/usr/local/include/octave-10.0.90/octave -I/usr/local/include  -pthread -fopenmp -g -O2 -g  -O2   -DHAVE_CONFIG_H routines_c/eigen.cc -o routines_c/eigen.o
routines_c/eigen.cc: In function ‘int tred2(const integer*, const integer*, doublereal*, doublereal*, doublereal*, doublereal*)’:
routines_c/eigen.cc:67:12: error: local external declaration ‘double sqrt(doublereal)’ [-fpermissive]
   67 |     double sqrt(doublereal), d_sign(doublereal *, doublereal *);
      |            ^~~~
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:528,
                 from /usr/include/c++/9/cstdint:38,
                 from /usr/include/c++/9/cinttypes:38,
                 from /usr/local/include/octave-10.0.90/octave/../octave/oct-conf-post-public.h:27,
                 from /usr/local/include/octave-10.0.90/octave/../octave/octave-config.h:98,
                 from /usr/local/include/octave-10.0.90/octave/../octave/oct.h:29,
                 from routines_c/eigen.cc:7:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:143:1: note: does not match previous declaration ‘double sqrt(double)’
  143 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
make: *** [Makefile:79: routines_c/eigen.o] Error 1
make: Leaving directory '/tmp/oct-GMcc6A/tisean-0.2.4/src'

error: pkg: error running 'make' for the tisean package
error: called from
    configure_make at line 117 column 9
    install at line 202 column 7
    pkg at line 619 column 9


Avinoam Kalma <avinoam>
Group Member
Wed 02 Apr 2025 02:57:59 PM UTC, comment #7: 

A late comment, but I will see about creating a release in the next couple of days

John Donoghue <lostbard>
Group Member
Wed 19 Mar 2025 07:11:04 PM UTC, comment #6: 

There have been quite a few changes in the repository of tisean since its last release in 2015:
https://sourceforge.net/p/octave/tisean/ci/01648917646909b3f9404776475ea65fa60852b0/log/?path=

Would it make sense to make a (compatibility) release now. Maybe even ahead of Octave 10?
Who could do that? Is Piotr Held still active as a maintainer?
@John D: Would you be able to make a release?

Markus Mützel <mmuetzel>
Group administrator
Tue 18 Mar 2025 08:36:48 PM UTC, comment #5: 

Hellw on Octave 10.0.90 is same problem "__poincare__.cc:132:16: error: use of undeclared identifier 'error_state'".

Anonymous
Fri 10 Mar 2023 01:30:11 PM UTC, comment #4: 

The patch from Comment #2 didn't quite clean up everything for me. I've attached the modified cumulative patch.

(file #54469)

Marius Schamschula <mschamschula>
Sat 08 Jan 2022 03:35:10 PM UTC, comment #3: 
John Donoghue <lostbard>
Group Member
Mon 29 Nov 2021 01:09:02 PM UTC, comment #2: 

Re-upload with correct bug number.

(file #52381)

Markus Mützel <mmuetzel>
Group administrator
Mon 29 Nov 2021 01:07:59 PM UTC, comment #1: 

Attaching a possible patch.

(file #52380)

Markus Mützel <mmuetzel>
Group administrator
Mon 29 Nov 2021 01:07:09 PM UTC, original submission:  

Quoting jwe from bug #61551:

> The global 'error_state' variable has been useless for quite some time now.  It's been removed on the default branch (what will become version 8.1 in about a year).  Since about 6 years ago, it has never had a value other than 0 in Octave code and is no longer useful for checking whether an error has occurred because exceptions are thrown, so checking the state of a variable after an error occurs is not useful except inside a 'catch' clause that handles 'octave::execution_exception'.
> All uses of this variable should be removed from the video package and any other packages that still use it.  You should have been seeing a warning at compile time about it being deprecated since before version 6 was released (it was marked as deprecated in May 2019).


This also applies to the tisean package.
I'll attach a possible patch as soon as I'll have a bug number.

Markus Mützel <mmuetzel>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #57102:  asan_tisean.txt added by dasergatskov (35KiB - text/plain)
file #54469:  of-tisean-error_state.patch added by mschamschula (134KiB - application/octet-stream)
file #52381:  of-tisean-error_state.patch added by mmuetzel (137KiB - application/octet-stream)
file #52380:  of-tisean-error_state.patch added by mmuetzel (137KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by mschamschula (Updated the item)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)
  • -email is unavailable- added by mmuetzel
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2025-04-04 dasergatskov Attached File- Added asan_tisean.txt, #57102
    2023-03-10 mschamschula Attached File- Added of-tisean-error_state.patch, #54469
    2022-01-08 lostbard StatusPatch Submitted Ready For Test
        Assigned toNone lostbard
    2021-11-29 mmuetzel Attached File- Added of-tisean-error_state.patch, #52381
    2021-11-29 mmuetzel Attached File- Added of-tisean-error_state.patch, #52380
        StatusNone Patch Submitted
    2021-11-29 mmuetzel Carbon-Copy- Added lostbard

    Back to the top

    Powered by Savane 3.15-e283.
    Corresponding source code