-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
manage "uninitialized" warnings #976
base: master
Are you sure you want to change the base?
manage "uninitialized" warnings #976
Conversation
Thanks for working on this. I am also running into this issue. |
.github/workflows/build.yml
Outdated
include: | ||
- os: ubuntu-22.04 | ||
package_manager: "apt" | ||
|
||
- os: ubuntu-24.04 | ||
package_manager: "apt" | ||
|
||
- os: ubuntu-24.04 | ||
package_manager: "apt" | ||
compiler: "g++-14" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Fedora g++ has been upgraded to 15.0.1 for F42+. I'm not sure if it's possible to also add that version to CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow yes. But not with the packages in the Ubuntu repos. I assume you either have to switch this pipeline to Docker images or add builds of the newer compilers to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two build failures:
In file included from /usr/include/eigen3/Eigen/Core:294,
from /pangolin-gcc15-fix/components/pango_opengl/include/pangolin/gl/opengl_render_state.h:40,
from /pangolin-gcc15-fix/components/pango_opengl/include/pangolin/gl/glsl.h:40,
from /pangolin-gcc15-fix/components/pango_python/src/pypangolin/glsl.cpp:29:
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<float, 3, 3, 0, 3, 3> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<float, 3, 3, 0, 3, 3> >&&)',
inlined from 'Eigen::Matrix<float, 3, 3, 0, 3, 3>::operator=(Eigen::Matrix<float, 3, 3, 0, 3, 3>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<float, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.631158].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
In file included from /usr/include/pybind11/eigen.h:12,
from /pangolin-gcc15-fix/components/pango_python/src/pypangolin/glsl.cpp:30:
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<float, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<float, 4, 4, 0, 4, 4> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<float, 4, 4, 0, 4, 4> >&&)',
inlined from 'Eigen::Matrix<float, 4, 4, 0, 4, 4>::operator=(Eigen::Matrix<float, 4, 4, 0, 4, 4>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<float, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.631260].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<float, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >&&)',
inlined from 'Eigen::Matrix<double, 3, 3, 0, 3, 3>::operator=(Eigen::Matrix<double, 3, 3, 0, 3, 3>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<double, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.631545].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<double, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 4, 0, 4, 4> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 4, 0, 4, 4> >&&)',
inlined from 'Eigen::Matrix<double, 4, 4, 0, 4, 4>::operator=(Eigen::Matrix<double, 4, 4, 0, 4, 4>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<double, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.631646].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<double, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
cc1plus: note: unrecognized command-line option '-Wno-null-pointer-subtraction' may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option '-Wno-null-pointer-arithmetic' may have been intended to silence earlier diagnostics
In file included from /usr/include/eigen3/Eigen/Core:294,
from /pangolin-gcc15-fix/components/pango_opengl/include/pangolin/gl/glformattraits.h:33,
from /pangolin-gcc15-fix/components/pango_opengl/include/pangolin/gl/gldraw.h:31,
from /pangolin-gcc15-fix/components/pango_python/src/pypangolin/gl_draw.cpp:29:
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<float, 3, 3, 0, 3, 3> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<float, 3, 3, 0, 3, 3> >&&)',
inlined from 'Eigen::Matrix<float, 3, 3, 0, 3, 3>::operator=(Eigen::Matrix<float, 3, 3, 0, 3, 3>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<float, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.583190].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
In file included from /usr/include/pybind11/eigen.h:12,
from /pangolin-gcc15-fix/components/pango_python/src/pypangolin/gl_draw.cpp:30:
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<float, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >&&)',
inlined from 'Eigen::Matrix<double, 3, 3, 0, 3, 3>::operator=(Eigen::Matrix<double, 3, 3, 0, 3, 3>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<double, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.583520].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<double, 3, 3, 0, 3, 3>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<float, 4, 4, 0, 4, 4> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<float, 4, 4, 0, 4, 4> >&&)',
inlined from 'Eigen::Matrix<float, 4, 4, 0, 4, 4>::operator=(Eigen::Matrix<float, 4, 4, 0, 4, 4>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<float, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.583649].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<float, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 4, 0, 4, 4> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 4, 0, 4, 4> >&&)',
inlined from 'Eigen::Matrix<double, 4, 4, 0, 4, 4>::operator=(Eigen::Matrix<double, 4, 4, 0, 4, 4>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<double, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.583786].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<double, 4, 4, 0, 4, 4>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >&&)',
inlined from 'Eigen::Matrix<double, 3, 1, 0, 3, 1>::operator=(Eigen::Matrix<double, 3, 1, 0, 3, 1>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<double, 3, 1, 0, 3, 1>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.585585].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<double, 3, 1, 0, 3, 1>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'Eigen::PlainObjectBase<Eigen::Matrix<float, 3, 1, 0, 3, 1> >::operator=(Eigen::PlainObjectBase<Eigen::Matrix<float, 3, 1, 0, 3, 1> >&&)',
inlined from 'Eigen::Matrix<float, 3, 1, 0, 3, 1>::operator=(Eigen::Matrix<float, 3, 1, 0, 3, 1>&&)' at /usr/include/eigen3/Eigen/src/Core/Matrix.h:281:22,
inlined from 'pybind11::detail::type_caster<Eigen::Matrix<float, 3, 1, 0, 3, 1>, void>::load(pybind11::handle, bool)' at /usr/include/pybind11/eigen/matrix.h:320:15:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:504:7: error: 'MEM[(struct PlainObjectBase &)&D.587243].m_storage' may be used uninitialized [-Werror=maybe-uninitialized]
504 | m_storage = std::move(other.m_storage);
| ^~~~~~~~~
/usr/include/pybind11/eigen/matrix.h: In member function 'pybind11::detail::type_caster<Eigen::Matrix<float, 3, 1, 0, 3, 1>, void>::load(pybind11::handle, bool)':
/usr/include/pybind11/eigen/matrix.h:320:17: note: '<anonymous>' declared here
320 | value = Type(fits.rows, fits.cols);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Reproducer:
|
This looks like the Pangolin/components/pango_python/CMakeLists.txt Lines 74 to 77 in 73967b3
|
1f62e50
to
063866c
Compare
@damaestro I think the |
This fixes an
maybe-uninitialized
warning/error instruct face_t
that is reported with g++ 14.Fixes #975.