octave-cli:2> s = sparse(1,2^32, 123); /home/pk/dl/octave-default/build/liboctave/../../liboctave/array/idx-vector.cc:237: runtime error: value 4.29497e+09 is outside the range of representable values of type 'int' ../../liboctave/array/idx-vector.cc:231:12: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' error: sparse: subscript indices must be either positive integers less than 2^31 or logicals octave-cli:2> s = sparse(1,2^32-1, 123); /home/pk/dl/octave-default/build/liboctave/../../liboctave/array/idx-vector.cc:237: runtime error: value 4.29497e+09 is outside the range of representable values of type 'int' error: sparse: subscript indices must be either positive integers less than 2^31 or logicals octave-cli:2> s = sparse(1,2^32-2, 123); /home/pk/dl/octave-default/build/liboctave/../../liboctave/array/idx-vector.cc:237: runtime error: value 4.29497e+09 is outside the range of representable values of type 'int' error: sparse: subscript indices must be either positive integers less than 2^31 or logicals octave-cli:2> s = sparse(1,2^31, 123); /home/pk/dl/octave-default/build/liboctave/../../liboctave/array/idx-vector.cc:237: runtime error: value 2.14748e+09 is outside the range of representable values of type 'int' error: sparse: subscript indices must be either positive integers less than 2^31 or logicals octave-cli:2> s = sparse(1,2^31-1, 123); ../../liboctave/array/Sparse.h:92:35: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' ==2093==WARNING: AddressSanitizer failed to allocate 0xffffffffffffffff bytes ==2093==AddressSanitizer's allocator is terminating the process instead of returning 0 ==2093==If you don't like this behavior set allocator_may_return_null=1 ==2093==AddressSanitizer CHECK failed: /home/pk/dl/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:149 "((0)) != (0)" (0x0, 0x0) #0 0x46c2ff in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/pk/dl/llvm/llvm/projects/compiler-rt/lib/asan/asan_rtl.cc:66 #1 0x471b51 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/pk/dl/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cc:69 #2 0x470890 in __sanitizer::AllocatorReturnNull() /home/pk/dl/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:149 #3 0x466f7d in operator new[](unsigned long) /home/pk/dl/llvm/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:54 #4 0x7fcba4f9d9b6 in Sparse::SparseRep::SparseRep(int, int, int) /home/pk/dl/octave-default/build/libinterp/../../liboctave/array/Sparse.h:94 #5 0x7fcb8fddb868 in Sparse::SparseRep::SparseRep(int, int, int) /home/pk/dl/octave-default/build/liboctave/../../liboctave/array/Sparse.h:97 #6 0x7fcb8fdf5852 in Sparse::Sparse(Array const&, idx_vector const&, idx_vector const&, int, int, bool, int) /home/pk/dl/octave-default/build/liboctave/../../liboctave/array/Sparse.cc:320 #7 0x7fcba817b584 in MSparse::MSparse(Array const&, idx_vector const&, idx_vector const&, int, int, bool, int) /home/pk/dl/octave-default/build/libinterp/../../liboctave/array/MSparse.h:64 #8 0x7fcba817a634 in SparseMatrix::SparseMatrix(Array const&, idx_vector const&, idx_vector const&, int, int, bool, int) /home/pk/dl/octave-default/build/libinterp/../../liboctave/array/dSparse.h:82 #9 0x7fcba90f6e49 in Fsparse(octave_value_list const&, int) /home/pk/dl/octave-default/build/libinterp/../../libinterp/corefcn/sparse.cc:199 #10 0x7fcba3ed54c9 in octave_builtin::do_multi_index_op(int, octave_value_list const&, std::list > const*) /home/pk/dl/octave-default/build/libinterp/../../libinterp/octave-value/ov-builtin.cc:132 #11 0x7fcba3ed28d6 in octave_builtin::subsref(std::string const&, std::list > const&, int, std::list > const*) /home/pk/dl/octave-default/build/libinterp/../../libinterp/octave-value/ov-builtin.cc:64 #12 0x7fcba3ed1965 in octave_builtin::subsref(std::string const&, std::list > const&, int) /home/pk/dl/octave-default/build/libinterp/../../libinterp/octave-value/ov-builtin.cc:47 #13 0x7fcba3edb2d5 in octave_builtin::subsref(std::string const&, std::list > const&) /home/pk/dl/octave-default/build/libinterp/../../libinterp/octave-value/ov-builtin.h:62 #14 0x7fcba4a4307b in octave_value::subsref(std::string const&, std::list > const&, int) /home/pk/dl/octave-default/build/libinterp/../../libinterp/octave-value/ov.cc:1267 #15 0x7fcba4a4475b in octave_value::subsref(std::string const&, std::list > const&, int, std::list > const*) /home/pk/dl/octave-default/build/libinterp/../../libinterp/octave-value/ov.cc:1280 #16 0x7fcba52138e0 in tree_index_expression::rvalue(int, std::list > const*) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-idx.cc:415 #17 0x7fcba520a4f8 in tree_index_expression::rvalue(int) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-idx.cc:284 #18 0x7fcba52161d0 in tree_index_expression::rvalue1(int) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-idx.cc:427 #19 0x7fcba50cc85f in tree_simple_assignment::rvalue1(int) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-assign.cc:85 #20 0x7fcba51a5393 in tree_evaluator::visit_statement(tree_statement&) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-eval.cc:747 #21 0x7fcba53e552d in tree_statement::accept(tree_walker&) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-stmt.cc:178 #22 0x7fcba51a707f in tree_evaluator::visit_statement_list(tree_statement_list&) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-eval.cc:797 #23 0x7fcba53e658d in tree_statement_list::accept(tree_walker&) /home/pk/dl/octave-default/build/libinterp/../../libinterp/parse-tree/pt-stmt.cc:291 #24 0x7fcba9526aea in main_loop() /home/pk/dl/octave-default/build/libinterp/../../libinterp/corefcn/toplev.cc:569 #25 0x7fcba0b7167c in octave_execute_interpreter /home/pk/dl/octave-default/build/libinterp/../../libinterp/octave.cc:883 #26 0x47bb8b in main /home/pk/dl/octave-default/build/src/../../src/main-cli.cc:42 #27 0x7fcb855ffde4 in __libc_start_main /build/buildd/eglibc-2.17/csu/libc-start.c:260 #28 0x47b7cc in _start (/home/pk/dl/octave-default/build/src/.libs/lt-octave-cli+0x47b7cc)