Imath icon indicating copy to clipboard operation
Imath copied to clipboard

PyImathFixedVArray: argument 1 value exceeds maximum object size

Open hobbes1069 opened this issue 2 years ago • 0 comments

I assume this should be pretty easy to address? It's currently a warning but warnings often become errors in newer versions of gcc.

/builddir/build/BUILD/Imath-3.1.8/src/python/PyImath/PyImathFixedVArray.cpp: In member function '__ct_base ':
/builddir/build/BUILD/Imath-3.1.8/src/python/PyImath/PyImathFixedVArray.cpp:101:44: warning: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  101 |     boost::shared_array<std::vector<T> > a(new std::vector<T>[length]);
      |                                            ^
/usr/include/c++/13/new:128:26: note: in a call to allocation function 'operator new []' declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^
/builddir/build/BUILD/Imath-3.1.8/src/python/PyImath/PyImathFixedVArray.cpp: In member function '__ct_base ':
/builddir/build/BUILD/Imath-3.1.8/src/python/PyImath/PyImathFixedVArray.cpp:117:44: warning: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  117 |     boost::shared_array<std::vector<T> > a(new std::vector<T>[length]);
      |                                            ^
/usr/include/c++/13/new:128:26: note: in a call to allocation function 'operator new []' declared here
  128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^

hobbes1069 avatar May 29 '23 12:05 hobbes1069