https://bugs.llvm.org/show_bug.cgi?id=43558
Bug ID: 43558
Summary: Compiled with clang-cl -fsanitize=address /MD
std::strtol does not change errno correctly
Product: clang
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
The following example prints 0 if both -fsanitize=address and /MD are passed as
arguments:
#include <cstdlib>
#include <iostream>
int main ()
{
char *eptr;
auto value = std::strtol ("99999999999999999999999999999999999999999", &eptr,
10);
std::cout << errno << '\n';
}
The correct result is printing 34 (ERANGE)
I have checked that the rest of this funciton family (stdtoul, strtoll,
strtoull, strtof, strtod, strtold) are not affected which makes this problem
strangely specific to strtol.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs