I was trying to build Ruckig w/ tests in Debug and got out-of-bound iterator access errors from some of the tests in
inline void add_profile(ProfileIter& profile) in a couple of places that was captured by asserts in STL.
It looks like the issue is with reserving std::array<Profile, 3> being the size of 3, while the profile iterator can advance by three from valid_profiles.begin() and point to valid_profiles.end() when being dereferenced eventually.
I summarize these behavior in a couple of commits. It would be also nice to add an input validation into add_profile to fail early in Debug (should be stripped out in Release anyway).
Environment: Visual Studio Community 2022 Release - x86_amd64; MSVC 17.9.34728.123; Debug build.
Hi everyone,
I was trying to build Ruckig w/ tests in Debug and got out-of-bound iterator access errors from some of the tests in
inline void add_profile(ProfileIter& profile)
in a couple of places that was captured by asserts in STL.It looks like the issue is with reserving
std::array<Profile, 3>
being the size of 3, while theprofile
iterator can advance by three fromvalid_profiles.begin()
and point tovalid_profiles.end()
when being dereferenced eventually.I summarize these behavior in a couple of commits. It would be also nice to add an input validation into
add_profile
to fail early in Debug (should be stripped out in Release anyway).Environment: Visual Studio Community 2022 Release - x86_amd64; MSVC 17.9.34728.123; Debug build.