-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
triageNew bug, unverifiedNew bug, unverified
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
Problem description
I haven't been able to track down the exact source of the bug, but my project's CI does one build variant against the top-of-tree pybind11 master, and has just started failing today.
I can confirm that it works for commit e44aae2, but fails for commit da6e071, which corresponds to the last merged PR, #5958.
In debug mode, I'm hitting assertions like:
/github/home/ext/dist/include/pybind11/detail/type_caster_base.h:380: pybind11::detail::values_and_holders::iterator::iterator(pybind11::detail::instance*, const type_vec*): Assertion `!types->empty()' failed.
Even in release modes (but with certain gcc hardening enabled), with gcc14 I'm getting
/usr/include/c++/14/bits/stl_vector.h:1149: constexpr std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::const_reference std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::operator[](size_type) const [with _Tp = pybind11::detail::type_info*; _Alloc = std::allocator<pybind11::detail::type_info*>; const_reference = pybind11::detail::type_info* const&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)
These tests all pass as late as yesterday, in the immediately previous pybind11 commit.
Reproducible example code
Is this a regression? Put the last known working version here if it is.
Not a regression
Metadata
Metadata
Assignees
Labels
triageNew bug, unverifiedNew bug, unverified