Clang Issues on Windows #3247
-
P.S. This is only in context to Clang for Windows I am trying to put together a PR for the next phase of IO abstraction task and running into a lot of issues with the Clang compiler, specifically on Windows. Seems like there are bugs related to SSO for string copy constructor where the lvalue isn't null terminated and so use of std::string::c_str causes random failures. I have had multiple recurring builds with no code changes generate different results (different tests failing for completely different reasons). The issue revolves around use of std::string::c_str function which is expected to point to a null terminated string. There are number of places in the code at the moment where this is used, usually as parameter to some number parsing/formatting functions (itoa, std::strtoll, std::strtoull, etc). Unfortunately, I haven't been able to reproduce any of this locally. Neither with debug nor with release builds. I searched the LLVM bug database to see if any such issue was reported but didn't find any. Here's a link to a build (windows-clang only) that demonstrates the problem. It runs only three cherry-picked tests for demonstration. The code was modified to sprinkle lots of debug statements to narrow down the problem. Scan thru' the logs and one can see that consecutive lines of code with a single copy constructor between them, generate different output when printed out. Following code snippet is a boiled down version of the problem:
Any suggestions on how to move forward, since I am sort of blocked. Appreciation some direction and input. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
OK, Hammer solution: Disable Windows Clang for now until it stabilizes |
Beta Was this translation helpful? Give feedback.
OK, Hammer solution: Disable Windows Clang for now until it stabilizes