bugGNU Octave - Bugs: bug #61704, Index vector related tests fail...

 
 

bug #61704: Index vector related tests fail with libc++ when compiled with visibility flags

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Sun 19 Dec 2021 03:39:37 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 20 Nov 2022 08:55:50 AM UTC, comment #17: 

The number of failing tests on the macOS GitHub runners reduced from 46 to 7 (macOS 11) or 6 (macOS 12). The remaining errors aren't related to index vectors.

Thanks for testing this with a compiler from yet another vendor.
If I read the testlog you attached correctly, those tests are already duplicated as expected failures on macOS. The condition for that should probably be "is linked to libc++" instead. But I don't know if there is (currently) a way to detect that on runtime.

Anyway, those failing tests aren't related to index vectors either. So, I'm going to close this report as fixed.

For the other failing tests, please open new reports if there aren't ones that track those errors already. But I believe there are existing reports for most (or all) of them. (The ones that are tagged in the tests right next to them marked with "testif ; ismac () <xxxxx>".)

Markus Mützel <mmuetzel>
Group administrator
Sun 20 Nov 2022 02:38:23 AM UTC, comment #16: 

fntests.log is attached



(file #53972)

Dmitri A. Sergatskov <dasergatskov>
Sun 20 Nov 2022 02:27:57 AM UTC, comment #15: 

Here is the latest (2ec625c04947 (stable)) build with
AMD (https://developer.amd.com/tools-and-sdks/) version of
clang/llvm/libc++ toolchain.

clang -v
AMD clang version 14.0.6 (CLANG: AOCC_4.0.0-Build#434 2022_10_28) (based on LLVM Mirror.Version.14.0.6)
Target: x86_64-unknown-linux-gnu



Failure Summary:

  libinterp/corefcn/conv2.cc-tst ................................. pass   48/51
                                                    (reported bug) XFAIL   3
  libinterp/corefcn/data.cc-tst .................................. pass 1231/1237
                                                    (reported bug) XFAIL   6
  libinterp/corefcn/dlmread.cc-tst ............................... pass    9/11
                                                                   FAIL    1
                                                              REGRESSION   1
  libinterp/corefcn/file-io.cc-tst ............................... pass  101/102
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/gsvd.cc-tst .................................. pass   40/46
                                                    (reported bug) XFAIL   6
  libinterp/corefcn/mappers.cc-tst ............................... pass  414/420
                                                              REGRESSION   4
                                                    (reported bug) XFAIL   2
  libinterp/corefcn/max.cc-tst ................................... pass  111/114
                                                    (reported bug) XFAIL   3
  libinterp/corefcn/pr-output.cc-tst ............................. pass   12/13
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/regexp.cc-tst ................................ pass  121/122
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/sparse-xpow.cc-tst ........................... pass    3/5
                                                    (reported bug) XFAIL   2
  libinterp/corefcn/strfns.cc-tst ................................ pass  129/132
                                                                   FAIL    3
  libinterp/octave-value/ov-java.cc-tst .......................... pass   15/16
                                                    (reported bug) XFAIL   1
  libinterp/parse-tree/pt-tm-const.cc-tst ........................ pass  202/203
                                                    (reported bug) XFAIL   1
  general/interp2.m .............................................. pass   57/59
                                                    (reported bug) XFAIL   2
  general/logspace.m ............................................. pass   10/12
                                                                   FAIL    2
  io/importdata.m ................................................ pass   26/27
                                                                   FAIL    1
  plot/appearance/camlookat.m .................................... pass    9/10
                                                    (reported bug) XFAIL   1
  plot/draw/isosurface.m ......................................... pass   29/30
                                                    (reported bug) XFAIL   1
  specfun/gammainc.m ............................................. pass   87/88
                                                    (reported bug) XFAIL   1
  specfun/realpow.m .............................................. pass    6/7
                                                    (reported bug) XFAIL   1
  statistics/normalize.m ......................................... pass   83/87
                                                    (reported bug) XFAIL   4
  statistics/var.m ............................................... pass   79/81
                                                    (reported bug) XFAIL   2
  testfun/test.m ................................................. pass   56/57
                                                    (reported bug) XFAIL   1
  bug-49379/bug-49379.tst ........................................ pass    0/1
                                                    (reported bug) XFAIL   1
  classdef/classdef.tst .......................................... pass   35/38
                                                    (reported bug) XFAIL   3
  fcn-handle/bug-51567.tst ....................................... pass    0/2
                                                    (reported bug) XFAIL   2
  eval-command.tst ............................................... pass   13/16
                                                    (reported bug) XFAIL   3
  io.tst ......................................................... pass  157/160
                                                                   FAIL    3

Summary:

  PASS                            17450
  FAIL                               10
  REGRESSION                          5
  XFAIL (reported bug)               49
  SKIP (missing feature)            171
  SKIP (run-time condition)          27


Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Sat 19 Nov 2022 05:05:14 PM UTC, comment #14: 

It looks like exception classes need to have default visibility both in the library where they are defined and in the code where they are used. I pushed a changeset here that adds (yet another) API macros for exception classes:
https://hg.savannah.gnu.org/hgweb/octave/rev/2ec625c04947

Those API macros are getting messy. If someone has an idea how to streamline those definitions for all libraries, please let us know.

It's been a long way since the first changes for patch #8919 have been pushed about two years ago. But I think we are getting close. Afaict, this is the last major bug report about issues with symbol visibility.
Maybe, Octave 8 can be the first release to come with symbol visibility enabled by default. 🎉

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Sun 06 Nov 2022 04:23:42 PM UTC, comment #13: 

IIUC, the wrong error messages are appearing because the `index_exception` exception isn't caught in `Fsub2ind` and `Find2sub` when linking to libc++:
https://hg.savannah.gnu.org/hgweb/octave/file/e7fc6251b698/libinterp/corefcn/sub2ind.cc

The relevant parts of the code are:

      try
        {
          idxa(j) = args(j+1).index_vector ();

          if (j > 0 && args(j+1).dims () != args(1).dims ())
            error ("sub2ind: all subscripts must be of the same size");
        }
      catch (index_exception& ie)
        {
          ie.set_pos_if_unset (nargin-1, j+1);
          ie.set_var ();
          std::string msg = ie.message ();
          error_with_id (ie.err_id (), "%s", msg.c_str ());
        }


and


  try
    {
      retval = Array<octave_value> (ind2sub (dv, args(1).index_vector ()));

      if (nd == 1)
        retval(0) = retval(1);
    }
  catch (const index_exception& ie)
    {
      error ("ind2sub: invalid index %s", ie.what ());
    }


IIUC, the exception that is thrown in that case is of type `invalid_index` which inherits from `index_exception`.
I would have thought that throwing an exception of that type would also be covered by catching the parent class. And that seems to be happening when linking to libstdc++.
Maybe a bug in LLVM libunwind?

On the other hand: Why is this only happening when we don't export all symbols? Are we still missing some symbols that we'd need to export for this to work correctly?

Markus Mützel <mmuetzel>
Group administrator
Fri 24 Dec 2021 09:24:38 AM UTC, comment #12: 

This no longer blocks Octave 7. Updating release tag.

Markus Mützel <mmuetzel>
Group administrator
Tue 21 Dec 2021 11:22:13 AM UTC, comment #11: 

Here is some discussion on a similar issue:

https://unix.stackexchange.com/questions/349150/gnu-octave-compilation-fails-with-libinterp-libs-liboctinterp-so-undefined-ref

Perhaps it can give you some clues though it does not help me.
nm returns "no symbols"

I had the issue with magick long time ago when I first tried to build octave with libc++, but I cannot find this discussion.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 20 Dec 2021 05:58:01 PM UTC, comment #10: 

If someone else would like to reproduce on Ubuntu. Here the commands I used:

sudo apt-get install libc++-dev libc++abi-dev libunwind-dev
../configure CC=clang CXX="clang++ -stdlib=libc++" CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/include/suitesparse" LDFLAGS="-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial" --prefix=${HOME}/usr --without-spqr --without-magick
make all


With SPQR and GraphicsMagick++, I got the exact same unresolved symbols like you did. (But using ld.bfd here.) Not exactly sure why. But that might be an issue with those libraries rather than with Octave...

Like you already wrote, the failing tests are almost the same ones that are failing on macOS. But it should be much easier/faster to inspect the impact of some changes now that we can reproduce on Linux. Thank you for the hint!

Markus Mützel <mmuetzel>
Group administrator
Sun 19 Dec 2021 11:09:53 PM UTC, comment #9: 

Just for the reference -- here are unresolved symbols during linkage:


ld.lld: error: libinterp/.libs/liboctinterp.so: undefined reference to Magick::Image::magick() const [--no-allow-shlib-undefined]
ld.lld: error: libinterp/.libs/liboctinterp.so: undefined reference to Magick::Image::attribute(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) [--no-allow-shlib-undefined]
ld.lld: error: libinterp/.libs/liboctinterp.so: undefined reference to Magick::Image::ping(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [--no-allow-shlib-undefined]
ld.lld: error: libinterp/.libs/liboctinterp.so: undefined reference to Magick::Image::comment() const [--no-allow-shlib-undefined]
ld.lld: error: libinterp/.libs/liboctinterp.so: undefined reference to Magick::CoderInfo::CoderInfo(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [--no-allow-shlib-undefined]
ld.lld: error: libinterp/.libs/liboctinterp.so: undefined reference to Magick::CoderInfo::description() const [--no-allow-shlib-undefined]
ld.lld: error: /home/dima/src/octave/clang_libcxx/liboctave/.libs/liboctave.so: undefined reference to cholmod_dense_struct* SuiteSparseQR_min2norm<std::__1::complex<double> >(int, double, cholmod_sparse_struct*, cholmod_dense_struct*, cholmod_common_struct*) [--no-allow-shlib-undefined]
ld.lld: error: /home/dima/src/octave/clang_libcxx/liboctave/.libs/liboctave.so: undefined reference to cholmod_sparse_struct* SuiteSparseQR_min2norm<std::__1::complex<double> >(int, double, cholmod_sparse_struct*, cholmod_sparse_struct*, cholmod_common_struct*) [--no-allow-shlib-undefined]
ld.lld: error: /home/dima/src/octave/clang_libcxx/liboctave/.libs/liboctave.so: undefined reference to cholmod_dense_struct* SuiteSparseQR_qmult<std::__1::complex<double> >(int, cholmod_sparse_struct*, cholmod_dense_struct*, long*, cholmod_dense_struct*, cholmod_common_struct*) [--no-allow-shlib-undefined]
ld.lld: error: /home/dima/src/octave/clang_libcxx/liboctave/.libs/liboctave.so: undefined reference to long SuiteSparseQR<std::__1::complex<double> >(int, double, long, cholmod_sparse_struct*, cholmod_sparse_struct**, long**, cholmod_sparse_struct**, long**, cholmod_dense_struct**, cholmod_common_struct*) [--no-allow-shlib-undefined]
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 19 Dec 2021 10:41:59 PM UTC, comment #8: 

Similar results on Ubuntu 20.10:


Failure Summary:

  liboctave/array/idx-vector.cc-tst .............................. pass    1/2
                                                                   FAIL    1
  libinterp/corefcn/conv2.cc-tst ................................. pass   48/51
                                                    (reported bug) XFAIL   3
  libinterp/corefcn/data.cc-tst .................................. pass 1205/1211
                                                    (reported bug) XFAIL   6
  libinterp/corefcn/dlmread.cc-tst ............................... pass    9/11
                                                                   FAIL    1
                                                              REGRESSION   1
  libinterp/corefcn/file-io.cc-tst ............................... pass   97/98
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/gsvd.cc-tst .................................. pass   45/46
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/mappers.cc-tst ............................... pass  412/418
                                                              REGRESSION   4
                                                    (reported bug) XFAIL   2
  libinterp/corefcn/max.cc-tst ................................... pass  111/114
                                                    (reported bug) XFAIL   3
  libinterp/corefcn/pr-output.cc-tst ............................. pass   12/13
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/sparse-xpow.cc-tst ........................... pass    1/2
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/strfns.cc-tst ................................ pass  129/132
                                                                   FAIL    3
  libinterp/corefcn/sub2ind.cc-tst ............................... pass   25/31
                                                                   FAIL    6
  libinterp/parse-tree/pt-tm-const.cc-tst ........................ pass  202/203
                                                    (reported bug) XFAIL   1
  general/logspace.m ............................................. pass   10/12
                                                                   FAIL    2
  io/importdata.m ................................................ pass   26/27
                                                                   FAIL    1
  plot/draw/isosurface.m ......................................... pass   29/30
                                                    (reported bug) XFAIL   1
  specfun/gammainc.m ............................................. pass   87/88
                                                    (reported bug) XFAIL   1
  specfun/realpow.m .............................................. pass    6/7
                                                    (reported bug) XFAIL   1
  testfun/test.m ................................................. pass   56/57
                                                    (reported bug) XFAIL   1
  bug-49379/bug-49379.tst ........................................ pass    0/1
                                                    (reported bug) XFAIL   1
  classdef/classdef.tst .......................................... pass   34/37
                                                    (reported bug) XFAIL   3
  fcn-handle/bug-51567.tst ....................................... pass    0/2
                                                    (reported bug) XFAIL   2
  index.tst ...................................................... pass  151/180
                                                                   FAIL   29
  io.tst ......................................................... pass  156/159
                                                                   FAIL    3
  logical-index.tst .............................................. pass   42/43
                                                                   FAIL    1
  struct.tst ..................................................... pass   46/48
                                                                   FAIL    2

Summary:

  PASS                            16908
  FAIL                               49
  REGRESSION                          5
  XFAIL (reported bug)               29
  SKIP (missing feature)            171
  SKIP (run-time condition)          26


Configure was:


../configure CC=clang CXX=clang++ CFLAGS="-pipe -O2 -flto=thin" CXXFLAGS="-pipe -stdlib=libc++ -flto=thin" FFLAGS="-pipe -O2" LDFLAGS="-fuse-ld=lld -Wl,--threads=2" --with-blas=openblasp --without-magick --disable-docs --without-cholmod


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 19 Dec 2021 08:22:32 PM UTC, comment #7: 

libc++abi was not installed. Configure run OK now. Compiling now.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 19 Dec 2021 08:07:06 PM UTC, comment #6: 

Very often the error is logged more clearly in the `config.log` file.
My guess is that the test is trying to link to the static pcre library and fails because it was linked with libstdc++...

Markus Mützel <mmuetzel>
Group administrator
Sun 19 Dec 2021 07:42:34 PM UTC, comment #5: 

On Ubuntu configure fails with:


checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking for pcre_compile in -lpcre... yes
checking whether PCRE library was compiled with UTF support... no
configure: error: PCRE library must be built with UTF support (--enable-utf)


It configures and compiles fine if i remove -stdlib=libc++ flag.

Also:


pcre2test -C
PCRE2 version 10.37 2021-05-26
Compiled with
  8-bit support
  16-bit support
  32-bit support
  UTF and UCP support (Unicode version 13.0.0)
  Just-in-time compiler support: x86 64bit (little endian + unaligned)
  Default newline sequence is LF
  \R matches all Unicode newlines
  \C is supported
  Internal link size = 2
  Parentheses nest limit = 250
  Default heap limit = 20000000 kibibytes
  Default match limit = 10000000
  Default depth limit = 10000000
  pcre2test has neither libreadline nor libedit support


Not sure what is the problem.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 19 Dec 2021 05:49:35 PM UTC, comment #4: 

I added -stlib=libc++ to CXXFLAGS.

I had to disable magic (--with-magick=no) and
sparse libraries (I had to remove suitesparse-devel from
the system, somehow configure options were not enough).
Those failed at linking stage.

I also disabled  docs (--disable-docs) because it tries to build
figures that relies on suitesparse though it was not present.

And that was it on Fedora 35. I have an Ubuntu 21.10. I can try to reproduce it there, but it is on a  slow computer (core duo), it might take a while.

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Sun 19 Dec 2021 05:34:43 PM UTC, comment #3: 

Thanks for checking. Re-titling accordingly.

Do you have instructions how to build Octave with libc++ on Linux? Is that possible with the default toolchain and distributed libraries, e.g. on Ubuntu?
ISTR, reading somewhere that libraries linked with libstdc++ shouldn't be used with libc++ and vice versa. Or was it only static libraries?

Markus Mützel <mmuetzel>
Group administrator
Sun 19 Dec 2021 05:25:38 PM UTC, comment #2: 

Here is summary:

+vetrbatim+
Failure Summary:

  liboctave/array/idx-vector.cc-tst .............................. pass    1/2  
                                                                   FAIL    1
  libinterp/corefcn/conv2.cc-tst ................................. pass   48/51 
                                                    (reported bug) XFAIL   3
  libinterp/corefcn/data.cc-tst .................................. pass 1205/1211
                                                    (reported bug) XFAIL   6
  libinterp/corefcn/dlmread.cc-tst ............................... pass    9/11 
                                                                   FAIL    1
                                                              REGRESSION   1
  libinterp/corefcn/file-io.cc-tst ............................... pass   97/98 
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/gsvd.cc-tst .................................. pass   43/46 
                                                    (reported bug) XFAIL   3
  libinterp/corefcn/mappers.cc-tst ............................... pass  412/418
                                                              REGRESSION   4
                                                    (reported bug) XFAIL   2
  libinterp/corefcn/max.cc-tst ................................... pass  111/114
                                                    (reported bug) XFAIL   3
  libinterp/corefcn/pr-output.cc-tst ............................. pass   12/13 
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/sparse-xpow.cc-tst ........................... pass    1/2  
                                                    (reported bug) XFAIL   1
  libinterp/corefcn/strfns.cc-tst ................................ pass  129/132
                                                                   FAIL    3
  libinterp/corefcn/sub2ind.cc-tst ............................... pass   25/31 
                                                                   FAIL    6
  libinterp/octave-value/ov-java.cc-tst .......................... pass   15/16 
                                                    (reported bug) XFAIL   1
  libinterp/parse-tree/pt-tm-const.cc-tst ........................ pass  202/203
                                                    (reported bug) XFAIL   1
  general/logspace.m ............................................. pass   10/12 
                                                                   FAIL    2
  io/importdata.m ................................................ pass   26/27 
                                                                   FAIL    1
  plot/draw/isosurface.m ......................................... pass   29/30 
                                                    (reported bug) XFAIL   1
  specfun/gammainc.m ............................................. pass   87/88 
                                                    (reported bug) XFAIL   1
  specfun/realpow.m .............................................. pass    6/7  
                                                    (reported bug) XFAIL   1
  testfun/test.m ................................................. pass   56/57 
                                                    (reported bug) XFAIL   1
  bug-49379/bug-49379.tst ........................................ pass    0/1  
                                                    (reported bug) XFAIL   1
  classdef/classdef.tst .......................................... pass   34/37 
                                                    (reported bug) XFAIL   3
  fcn-handle/bug-51567.tst ....................................... pass    0/2  
                                                    (reported bug) XFAIL   2
  index.tst ...................................................... pass  151/180
                                                                   FAIL   29
  io.tst ......................................................... pass  156/159
                                                                   FAIL    3
  logical-index.tst .............................................. pass   42/43 
                                                                   FAIL    1
  struct.tst ..................................................... pass   46/48 
                                                                   FAIL    2

Summary:

  PASS                            16694
  FAIL                               49
  REGRESSION                          5
  XFAIL (reported bug)               32
  SKIP (missing feature)            376
  SKIP (run-time condition)          32
-verbatim-

hg id
84344af9b019 (stable)

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Sun 19 Dec 2021 05:21:30 PM UTC, comment #1: 

I think I can reproduce most of those failures compiling with clang and libc++ (v. 13.0.0. on fedora 35).

I got total 49 failures on current stable.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 19 Dec 2021 03:39:37 PM UTC, original submission:  

When Octave is compiled with visibility flags, some tests that are related to indexing fail on macOS. See also bug #59820.

The failing tests on the macOS runners on GitHub:

>>>>> processing /Users/runner/work/octave/octave/.build/liboctave/array/idx-vector.cc-tst
***** error id=Octave:index-out-of-bounds 1(find ([1,1] != 0))
!!!!! error failed.
Expected id=Octave:index-out-of-bounds, but got <>


>>>>> processing /Users/runner/work/octave/octave/.build/libinterp/corefcn/sub2ind.cc-tst
***** error <index \(0,_,_\)> sub2ind ([10 10 10], 0, 1, 1)
!!!!! error failed.
Expected <index \(0,_,_\)>, but got <index 0: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(_,0,_\)> sub2ind ([10 10 10], 1, 0, 1)
!!!!! error failed.
Expected <index \(_,0,_\)>, but got <index 0: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(_,_,0\)> sub2ind ([10 10 10], 1, 1, 0)
!!!!! error failed.
Expected <index \(_,_,0\)>, but got <index 0: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(1.5,_\)> sub2ind ([10 10], 1.5, 1)
!!!!! error failed.
Expected <index \(1.5,_\)>, but got <index 1.5: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(_,1.5\)> sub2ind ([10 10], 1, 1.5)
!!!!! error failed.
Expected <index \(_,1.5\)>, but got <index 1.5: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <invalid index> ind2sub ([2, 2, 2], -1:8)
!!!!! error failed.
Expected <invalid index>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>


>>>>> processing /Users/runner/work/octave/octave/test/index.tst
***** error <index \(0\): subscripts must be>     1(0)
!!!!! error failed.
Expected <index \(0\): subscripts must be>, but got <index 0: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(-1\): subscripts must be>    1(-1)
!!!!! error failed.
Expected <index \(-1\): subscripts must be>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(_,0.5\): subscripts>                 {}(1,0.5)
!!!!! error failed.
Expected <index \(_,0.5\): subscripts>, but got <index 0.5: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \([Nn][aA][Nn],_\): subscripts>                 1(NaN,1)
!!!!! error failed.
Expected <index \([Nn][aA][Nn],_\): subscripts>, but got <index nan: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(_,_,<cell....\[x8\]...\): subscripts> [](1,1,{},1,1,1,1,1,1,1,1)
!!!!! error failed.
Expected <index \(_,_,<cell....\[x8\]...\): subscripts>, but got <index <cell>: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(...\[x9\]...-1,_\): subscript>      1(1,1,1,1,1,1,1,1,1,-1,1)
!!!!! error failed.
Expected <index \(...\[x9\]...-1,_\): subscript>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <index \(-1\): subscripts>                   1(1)(-1)(1)
!!!!! error failed.
Expected <index \(-1\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(3\): out of bound 2>      abc([false, true, true])
!!!!! error failed.
Expected <abc\(3\): out of bound 2>, but got <index (3): out of bound 2 (dimensions are 1x2)>

***** error <abc\(-1\): subscripts>         abc(-1)(1)(1)
 ## xerror <index \(-1\): subscripts> abc(1)(-1)(1)   ## why no 'xerror' test?
!!!!! error failed.
Expected <abc\(-1\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(5\): out of bound 4>         abc(5)
!!!!! error failed.
Expected <abc\(5\): out of bound 4>, but got <index (5): out of bound 4 (dimensions are 2x2)>

***** error <abc\(_,3\): out of bound 2 \(dimensions are 2x2\)> abc(2,3)
!!!!! error failed.
Expected <abc\(_,3\): out of bound 2 \(dimensions are 2x2\)>, but got <index (_,3): out of bound 2 (dimensions are 2x2)>

***** error <abc\(_,_,0.5\): subscripts>       exp (abc(2,3,0.5))
!!!!! error failed.
Expected <abc\(_,_,0.5\): subscripts>, but got <index 0.5: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(_,5\): out of bound 4>                            abc(2,5)
!!!!! error failed.
Expected <abc\(_,5\): out of bound 4>, but got <index (_,5): out of bound 4 (dimensions are 2x2x2)>

***** error <abc\(_,3,_\): out of bound 2 \(dimensions are 2x2x2\)> abc(2,3,2)
!!!!! error failed.
Expected <abc\(_,3,_\): out of bound 2 \(dimensions are 2x2x2\)>, but got <index (_,3,_): out of bound 2 (dimensions are 2x2x2)>

***** error <index \(-2,_\): subscripts>               eye (4)(-2,3)
!!!!! error failed.
Expected <index \(-2,_\): subscripts>, but got <index -2: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(_,0.3,_\): subscripts>  abc(2,0.3,5)
!!!!! error failed.
Expected <abc\(_,0.3,_\): subscripts>, but got <index 0.3: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(_,0.3,_\): subscripts>  abc{2,0.3,5}
!!!!! error failed.
Expected <abc\(_,0.3,_\): subscripts>, but got <index 0.3: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(-2,_,_,_\): subscripts> abc{-2,1,1,1}
!!!!! error failed.
Expected <abc\(-2,_,_,_\): subscripts>, but got <index -2: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(0,_,_,_\): subscripts>  abc(0,1,1,1) = 1
!!!!! error failed.
Expected <abc\(0,_,_,_\): subscripts>, but got <index 0: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\([Nn][aA][Nn]\): subscripts>         abc(NA)
!!!!! error failed.
Expected <abc\([Nn][aA][Nn]\): subscripts>, but got <index nan: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(_,_,_,[Ii][nN][Ff],_\): subscripts> abc(1,1,1,Inf,1)
!!!!! error failed.
Expected <abc\(_,_,_,[Ii][nN][Ff],_\): subscripts>, but got <index inf: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(-1\): subscripts>                abc(-1)
!!!!! error failed.
Expected <abc\(-1\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(-1\): subscripts>                abc(-1) = 1
!!!!! error failed.
Expected <abc\(-1\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(-1,_\): subscripts>              abc(-1,1)
!!!!! error failed.
Expected <abc\(-1,_\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(-1,_\): subscripts>              abc(-1,1) = 1
!!!!! error failed.
Expected <abc\(-1,_\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(4,_\): out of bound 3 \(dimensions are 3x3\)> abc(4,1)
!!!!! error failed.
Expected <abc\(4,_\): out of bound 3 \(dimensions are 3x3\)>, but got <index (4,_): out of bound 3 (dimensions are 3x3)>

***** error <abc\(-1\): subscripts>             abc(-1)
!!!!! error failed.
Expected <abc\(-1\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(-1,_\): subscripts>           abc(-1,1)
!!!!! error failed.
Expected <abc\(-1,_\): subscripts>, but got <index -1: subscripts must be either integers 1 to (2^63)-1 or logicals>

***** error <abc\(4,_\): out of bound 1 \(dimensions are 1x10\)> abc(4,1)
!!!!! error failed.
Expected <abc\(4,_\): out of bound 1 \(dimensions are 1x10\)>, but got <index (4,_): out of bound 1 (dimensions are 1x10)>


>>>>> processing /Users/runner/work/octave/octave/test/logical-index.tst
***** error id=Octave:index-out-of-bounds a(logical ([1,1]))
!!!!! error failed.
Expected id=Octave:index-out-of-bounds, but got <>


>>>>> processing /Users/runner/work/octave/octave/test/struct.tst
***** error id=Octave:index-out-of-bounds
 a(1).x.x = 1;
 a(2).x;
!!!!! error failed.
Expected id=Octave:index-out-of-bounds, but got <>

***** error id=Octave:index-out-of-bounds
 s = resize (struct (),3,2);
 s(3).foo = 42;
 s(7);
!!!!! error failed.
Expected id=Octave:index-out-of-bounds, but got <>


It looks like some expression don't result in an error when they should. Or they result in a different error.
In some cases, it looks like the "base" implementation of the error message is displayed instead of a specialization.

I set the release to 7.0.90 because it would be nice to have that sorted out for Octave 7. However, we already default to not build with visibility flags on that platform (on the stable branch).

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 #53972:  fntests.log.gz added by dasergatskov (1MiB - application/gzip)

 

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 mmuetzel (Submitted the item)
  •  

    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
    2022-11-20 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-11-20 dasergatskov Attached File- Added fntests.log.gz, #53972
    2022-11-19 mmuetzel StatusConfirmed Ready For Test
    2021-12-24 mmuetzel Release7.0.90 dev
    2021-12-19 mmuetzel StatusNone Confirmed
        Operating SystemMac OS Any
        SummaryIndex vector related tests fail on macOS when compiled with visibility flags Index vector related tests fail with libc++ when compiled with visibility flags

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code