Skip to content

Error introduced by boost::core::launder #122

Closed
@alandefreitas

Description

@alandefreitas

The Boost.URL drone job for Windows (x86) broke in the last days from an old run to a more recent run. These two jobs are testing the very same commit: no code changes in Boost.URL. Also, it only fails in MSVC 14.1. MSVC 14.3 works fine.

Output
c:\drone\boost-root\libs\url\src\detail\pattern.cpp(700) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'd:\agent\_work\2\s\src\vctools\compiler\utc\src\p2\main.c', line 187)
 To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++ 
 Help menu, or open the Technical Support help file for more information

c:\drone\boost-root\libs\url\src\detail\pattern.cpp(700) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'd:\agent\_work\2\s\src\vctools\compiler\utc\src\common\error.c', line 835)
 To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++ 
 Help menu, or open the Technical Support help file for more information

    call "bin.v2\standalone\msvc\msvc-14.1\adrs-mdl-32\archt-x86\msvc-setup.bat"  >nul
 cl /Zm800 -nologo "libs\url\src\detail\pattern.cpp" -c -Fo"bin.v2\libs\url\test\limits\limits.test\msvc-14.1\rls\adrs-mdl-32\cxstd-17-iso\thrd-mlt\detail\pattern.obj"     -TP /wd4675 /EHs /std:c++17 /GR /Zc:throwingNew /O2 /Ob2 /W4 /WX /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /we4265 -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_DYN_LINK=1 -DBOOST_URL_MAX_SIZE=16 -DBOOST_URL_NO_LIB -DBOOST_URL_STATIC_LINK -DNDEBUG "-I." "-Ilibs\url\extra" "-Ilibs\url\test\limits" 

...failed compile-c-c++ bin.v2\libs\url\test\limits\limits.test\msvc-14.1\rls\adrs-mdl-32\cxstd-17-iso\thrd-mlt\detail\pattern.obj...

The message is very unhelpful but Peter helped me track down the error. We have a pattern.cpp source file that includes Boost.Optional and the error goes away when we check out any version of Boost.Optional before e31cf6f. In particular, the error goes away if we comment out:

    T const& ref() const { return * /*boost::core::launder*/(ptr_ref()); }
    T &      ref()       { return * /*boost::core::launder*/(ptr_ref()); }

Unfortunately, I can't identify why this is causing an error. We could only identify what is causing it.

This is also related to #121.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions