-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Milestone
Description
Expected behavior
Poco::NumberParser::parse a invalid integer string, it should throw execption.
Actual behavior
raise a debug assertion
Steps to reproduce the problem
(please make this a SSCCE, if applicable and reasonable)
void testParseUTF8()
{
const char test[] = { -23, -108, -103, -24, -81, -81, 0 };
Poco::NumberParser::parse(test); // raise debug assertion
}assert by
extern "C" int __cdecl _chvalidator(int const c, int const mask)
{
_ASSERTE(c >= -1 && c <= 255);
return _chvalidator_l(nullptr, c, mask);
}call stack
ucrtbased.dll!_chvalidator(int c, int mask) line 36 C++
ucrtbased.dll!fast_check(const int c, const int mask) line 24 C++
ucrtbased.dll!isspace(int c) line 107 C++
PocoFoundation64d.dll!Poco::strToInt<int>(const char * pStr, int & result, short base, char thSep) line 88 C++
PocoFoundation64d.dll!Poco::NumberParser::tryParse(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & s, int & value, char thSep) line 54 C++
PocoFoundation64d.dll!Poco::NumberParser::parse(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & s, char thSep) line 44 C++
POCO version
1.9.0
Compiler and version
visual studio community 2017
Operating system and version
Windows 10 home
Other relevant information
from: https://msdn.microsoft.com/en-us/library/y13z34da.aspx
The behavior of isspace and _isspace_l is undefined if c is not EOF or in the range 0 through 0xFF, inclusive. When a debug CRT library is used and c is not one of these values, the functions raise an assertion.
Reactions are currently unavailable