Open mloskot opened 2 years ago
I notice that only debug builds fail, aka cl /std:c++latest /EHsc test.cpp
compiles.
This bug report Regression default-initializing static duration array of vectors in C++latest debug mode is a close match.
Which make me wonder why use /std:c++latest
? Isn't this asking for troubles π ?
FYI, I reported the issue here, https://developercommunity.visualstudio.com/t/INTERNAL-COMPILER-ERROR-compiling-std::v/10011526
Which make me wonder why use /std:c++latest? Isn't this asking for troubles π ?
Yes, /std:c++latest
needs to be disabled.
This is aligned with the grand plan as discussed in https://github.com/boostorg/gil/issues/642#issuecomment-1092730524
FYI, I reported the issue here, https://developercommunity.visualstudio.com/t/INTERNAL-COMPILER-ERROR-compiling-std::v/10011526
Latest update: "A fix for this issue has been internally implemented and is being prepared for release. "
According to https://developercommunity.visualstudio.com/t/INTERNAL-COMPILER-ERROR-compiling-std::v/10011526#T-N10277969 this should be fixed by now:
A fix for this issue has been released! Install the most recent release from https://visualstudio.microsoft.com/downloads/. Thank you for providing valuable feedback which has helped improve the product.
Unfortunately, it does not say which versions of MSVC contain the fix. So somebody might still need to confirm that this is fixed for the versions used in the CI jobs.
Edit: Oh wait ... it says "Fixed In: Visual Studio 2022 version 17.3", so it should at least work for the windows-2022
image in CI, because that is using VS 17.6.33815.320 at the moment. (See https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md#visual-studio-enterprise-2022.)
Actual behavior
Currently, this internal error is occurring for two CI jobs (recently improved by @striezel)
Here is sample log:
Assuming
libs\gil\test\core\histogram\fill.cpp(64)
means line 64, bug must be coming from the vectors ofbool
here: https://github.com/boostorg/gil/blob/3e729e5dae4c0ba6f407f6885bf6a18d525e8489/test/core/histogram/fill.cpp#L58-L64@codejaeger since it's your code, before I jump in modifying it myself, would you have any suggestions/preferences?
Some ideas:
std::vector<std::vector<bool>>
with linearstd::vector<bool>
orstd::bitset
mask_2d
andmask_2d_fixed
adapting linearstd::vector<bool>
, likekernel_2d
C++ Minimal Working Example