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
"string iterator not incrementable" issue with the chromaprint_decode_fingerprint() function #31
Comments
You will below an extract of the Visual Studio xstring header file. _Myiter& operator++()
{ // preincrement
#if _ITERATOR_DEBUG_LEVEL == 2
const auto _Mycont = static_cast<const _Mystr *>(this->_Getcont());
if (_Mycont == 0
|| _Ptr == nullptr_t{}
|| _Mycont->_Myptr() + _Mycont->_Mysize <= _Unfancy(_Ptr))
{ // report error
_DEBUG_ERROR("string iterator not incrementable");
_SCL_SECURE_OUT_OF_RANGE;
}
#elif _ITERATOR_DEBUG_LEVEL == 1
_SCL_SECURE_VALIDATE(_Ptr != nullptr_t{});
const auto _Mycont = static_cast<const _Mystr *>(this->_Getcont());
_SCL_SECURE_VALIDATE(_Mycont != 0);
_SCL_SECURE_VALIDATE_RANGE(_Unfancy(_Ptr) < _Mycont->_Myptr() + _Mycont->_Mysize);
#endif /* _ITERATOR_DEBUG_LEVEL */
++_Ptr;
return (*this);
} |
I don't have access to a computer with Visual Studio. Can you help me pinpoint the code in Chromaprint that causes this? I don't see anything obviously wrong and Valgrind reports no illegal memory access. |
That is very strange. The code is only iterating up to |
Hm, actually no, there is something wrong. Thank for catching this. I'll have a fix soon. |
It's a shame the C++ library included with GCC doesn't have this kind of iterator checks. Valgrind did not catch this, because |
Yeah. Visual Studio is a very good IDE for development. And Visual Studio Community is free. You should try. |
Hi Lukas,
I'm trying to use the chromaprint_decode_fingerprint function but I get the following error message at runtime:
Debug Assertion Failed!
Program: MSVCP140D.DLL
File: VC\include\xstring
Line: 106
Expression: string iterator not incrementable
Do you know why?
Thanks.
You will find below a sample repro:
The text was updated successfully, but these errors were encountered: