Skip to content

libs\gil\test\core\histogram\fill.cpp(64): fatal error C1001: Internal compiler error #645

Description

@mloskot

Actual behavior

Currently, this internal error is occurring for two CI jobs (recently improved by @striezel)

  • windows (msvc-14.3, 14,17,latest, 32,64, windows-2022)
  • windows (msvc-14.2, 14,17,latest, 32,64, windows-2019)

Here is sample log:

2022-04-09T12:28:10.5312066Z compile-c-c++ bin.v2\libs\gil\test\core\histogram\fill.test\msvc-14.3\dbg\adrs-mdl-32\cxstd-ltst-iso\thrd-mlt\fill.obj
2022-04-09T12:28:10.5520345Z fill.cpp
2022-04-09T12:28:10.5555671Z libs\gil\test\core\histogram\fill.cpp(64): fatal error C1001: Internal compiler error.
2022-04-09T12:28:10.5558643Z (compiler file 'msc1.cpp', line 1691)
2022-04-09T12:28:10.5593791Z  To work around this problem, try simplifying or changing the program near the locations listed above.
2022-04-09T12:28:10.6231214Z If possible please provide a repro here: https://developercommunity.visualstudio.com 
2022-04-09T12:28:10.6231947Z Please choose the Technical Support command on the Visual C++ 
2022-04-09T12:28:10.6424482Z  Help menu, or open the Technical Support help file for more information
2022-04-09T12:28:10.6481826Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\vector(1946): note: while evaluating constexpr function 'std::vector<std::_Vbase,std::allocator<std::_Vbase>>::data'
2022-04-09T12:28:10.6509015Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\vector(2240): note: while evaluating constexpr function 'std::_Vb_iter_base<_Alvbase_wrapped>::_Total_off'
2022-04-09T12:28:10.6552876Z         with
2022-04-09T12:28:10.6602833Z         [
2022-04-09T12:28:10.6608564Z             _Alvbase_wrapped=std::_Wrap_alloc<std::allocator<std::_Vbase>>
2022-04-09T12:28:10.6620406Z         ]
2022-04-09T12:28:10.6628742Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\xutility(4036): note: while evaluating constexpr function 'std::_Vb_iterator<std::_Wrap_alloc<std::allocator<std::_Vbase>>>::operator *'
2022-04-09T12:28:10.6652164Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\vector(2816): note: while evaluating constexpr function 'std::_Copy_unchecked'
2022-04-09T12:28:10.6688282Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\vector(2798): note: while evaluating constexpr function 'std::vector<bool,std::allocator<bool>>::_Insert'
2022-04-09T12:28:10.6766846Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\vector(2529): note: while evaluating constexpr function 'std::vector<bool,std::allocator<bool>>::insert'
2022-04-09T12:28:10.6819916Z INTERNAL COMPILER ERROR in 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\bin\HostX86\x86\cl.exe'
2022-04-09T12:28:12.0979146Z     Please choose the Technical Support command on the Visual C++
2022-04-09T12:28:12.0979696Z     Help menu, or open the Technical Support help file for more information
2022-04-09T12:28:12.0979977Z 
2022-04-09T12:28:12.0980652Z     call "bin.v2\standalone\msvc\msvc-14.3\adrs-mdl-32\archt-x86\msvc-setup.bat"  >nul
2022-04-09T12:28:12.0987215Z  cl /Zm800 -nologo "libs\gil\test\core\histogram\fill.cpp" -c -Fo"bin.v2\libs\gil\test\core\histogram\fill.test\msvc-14.3\dbg\adrs-mdl-32\cxstd-ltst-iso\thrd-mlt\fill.obj"     -TP /wd4675 /EHs /std:c++latest /GR /Zc:throwingNew /Z7 /Od /Ob0 /W3 /MDd /Zc:forScope /Zc:wchar_t /Zc:inline -DBOOST_ALL_NO_LIB=1 -DBOOST_GIL_USE_CONCEPT_CHECK=1 "-I." "-Ilibs\gil\test" 
2022-04-09T12:28:12.0987978Z 
2022-04-09T12:28:12.0988464Z ...failed compile-c-c++ bin.v2\libs\gil\test\core\histogram\fill.test\msvc-14.3\dbg\adrs-mdl-32\cxstd-ltst-iso\thrd-mlt\fill.obj...

Assuming libs\gil\test\core\histogram\fill.cpp(64) means line 64, bug must be coming from the vectors of bool here:

std::vector<std::vector<bool>> mask =
{
{1, 0, 0, 1},
{0, 0, 1, 1},
{0, 1, 0, 1},
{1, 1, 0, 0},
};

@codejaeger since it's your code, before I jump in modifying it myself, would you have any suggestions/preferences?

Some ideas:

  1. Replace std::vector<std::vector<bool>> with linear std::vector<bool> or std::bitset
  2. Introduce mask_2d and mask_2d_fixed adapting linear std::vector<bool>, like kernel_2d

C++ Minimal Working Example

// cl /std:c++latest /EHsc /MDd /D_DEBUG test.cpp
#include <vector>

std::vector<std::vector<bool>> mask =
{
    {1, 0, 0, 1},
    {0, 0, 1, 1},
    {0, 1, 0, 1},
    {1, 1, 0, 0},
};

int main()
{
    return 0;
}

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cat/annoyanceNot a bug, not a feature, but something that should be improvedcoreboost/gil

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions