AcademySoftwareFoundation / AcademySoftwareFoundation/Imath
MinGW note: destination object of size 0 allocated by 'operator new []'
- Dominant language
- C++
- Stars
- 488
- Forks
- 161
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 3
Description
This is with GCC 12.2.0 on [MSYS2 UCRT64](https://github.com/msys2/MINGW-packages/actions/runs/3417550887/jobs/5688814001#step:11:319)/MINGW64/MINGW32:
```
In file included from C:/_/mingw-w64-imath/src/Imath-3.1.6/src/python/PyImath/PyImath.h:16,
from C:/_/mingw-w64-imath/src/Imath-3.1.6/src/python/PyImath/PyImathColor4.cpp:14:
In constructor 'PyImath::FixedArray2D::FixedArray2D(Py_ssize_t, Py_ssize_t) [with T = Imath_3_1::Color4]',
inlined from 'PyImath::FixedArray2D PyImath::FixedArray2D::getslice(PyObject*) const [with T = Imath_3_1::Color4]' at C:/_/mingw-w64-imath/src/Imath-3.1.6/src/python/PyImath/PyImathFixedArray2D.h:224:32:
C:/_/mingw-w64-imath/src/Imath-3.1.6/src/python/PyImath/PyImathFixedArray2D.h:75:34: note: destination object of size 0 allocated by 'operator new []'
75 | boost::shared_array a(new T[_size]);
| ^~~~~~~~~~~~
```
Contributor guide
Research direction
Start with src/python/PyImath/PyImathFixedArray2D.h at lines 75 and 224, then reproduce the GCC 12.2.0 diagnostic in the referenced MSYS2 environments. Determine whether the zero-sized allocation warning indicates a real issue or a compiler-analysis case; done means the warning's cause and resolution are confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100