D
Dorl
Guest
we've seen a regression in the 16/16.1 VS compiler for C++ that generators that does not yield anything throws due to what seems to be an undefined state.
the generator throwing code is pretty much:
std::experimental::generator<std:air<SomeType, SomeType>> get()
{
while (some clause that doesn't evaluate to true in this case){
co_yield {some value, some value }
}
if (some other clause that doesn't evaluate to true in this case){
co_yield {some other value, some other value}
}
}
we're seein the crash only in X86 release version.
is there something i'm missing with the code ? i couldn't see any documentation about not allowed to have generators that doesn't actually yield.
the crash dump looks like:
ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.
EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid
EXCEPTION_CODE_STR: 80000003
EXCEPTION_PARAMETER1: 00000000
EXCEPTION_PARAMETER2: 866cfd48
EXCEPTION_PARAMETER3: 00000000
01 068ff000 751c179c ntdll!NtWaitForSingleObject+0xc
02 068ff06c 75d8c533 KERNELBASE!WaitForSingleObjectEx+0x98
03 068ff084 75d8c4e2 kernel32!WaitForSingleObjectExImplementation+0x75
04 068ff098 014fa797 kernel32!WaitForSingleObject+0x12
05 068ff0b0 014fa023 SentinelAgent!google_breakpad::ExceptionHandler::WriteMinidumpOnHandlerThread+0x59 [D:\google-breakpad\src\client\windows\handler\exception_handler.cc @ 729]
06 068ff0d0 75da0a26 SentinelAgent!google_breakpad::ExceptionHandler::HandleException+0x83 [D:\google-breakpad\src\client\windows\handler\exception_handler.cc @ 520]
07 068ff158 774d2be5 kernel32!UnhandledExceptionFilter+0x127
08 068ff170 774d320c ntdll!TppExceptionFilter+0x59
09 068ff184 7749aedb ntdll!TppWorkerpInnerExceptionFilter+0x12
0a 068ff194 7741e55c ntdll!TppWorkerThread+0x57f
0b 068ff1a8 7741e3f4 ntdll!_EH4_CallFilterFunc+0x12
0c 068ff1d0 77446d09 ntdll!_except_handler4+0x8e
0d 068ff1f4 77446cdb ntdll!ExecuteHandler2+0x26
0e 068ff218 7741fbc7 ntdll!ExecuteHandler+0x24
0f 068ff2a4 77446b67 ntdll!RtlDispatchException+0x127
10 068ff2a4 015989f4 ntdll!KiUserExceptionDispatcher+0xf
11 068ff750 00f589f5 trigger::to_chunks$_ResumeCoro$2<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std:air<HKEY__ *,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > > >+0x284 [D:\jenkins\workspace\winagent-branch-build-fast\Location\RegistryChangeTrigger.cpp @ 25]
Continue reading...
the generator throwing code is pretty much:
std::experimental::generator<std:air<SomeType, SomeType>> get()
{
while (some clause that doesn't evaluate to true in this case){
co_yield {some value, some value }
}
if (some other clause that doesn't evaluate to true in this case){
co_yield {some other value, some other value}
}
}
we're seein the crash only in X86 release version.
is there something i'm missing with the code ? i couldn't see any documentation about not allowed to have generators that doesn't actually yield.
the crash dump looks like:
ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.
EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid
EXCEPTION_CODE_STR: 80000003
EXCEPTION_PARAMETER1: 00000000
EXCEPTION_PARAMETER2: 866cfd48
EXCEPTION_PARAMETER3: 00000000
01 068ff000 751c179c ntdll!NtWaitForSingleObject+0xc
02 068ff06c 75d8c533 KERNELBASE!WaitForSingleObjectEx+0x98
03 068ff084 75d8c4e2 kernel32!WaitForSingleObjectExImplementation+0x75
04 068ff098 014fa797 kernel32!WaitForSingleObject+0x12
05 068ff0b0 014fa023 SentinelAgent!google_breakpad::ExceptionHandler::WriteMinidumpOnHandlerThread+0x59 [D:\google-breakpad\src\client\windows\handler\exception_handler.cc @ 729]
06 068ff0d0 75da0a26 SentinelAgent!google_breakpad::ExceptionHandler::HandleException+0x83 [D:\google-breakpad\src\client\windows\handler\exception_handler.cc @ 520]
07 068ff158 774d2be5 kernel32!UnhandledExceptionFilter+0x127
08 068ff170 774d320c ntdll!TppExceptionFilter+0x59
09 068ff184 7749aedb ntdll!TppWorkerpInnerExceptionFilter+0x12
0a 068ff194 7741e55c ntdll!TppWorkerThread+0x57f
0b 068ff1a8 7741e3f4 ntdll!_EH4_CallFilterFunc+0x12
0c 068ff1d0 77446d09 ntdll!_except_handler4+0x8e
0d 068ff1f4 77446cdb ntdll!ExecuteHandler2+0x26
0e 068ff218 7741fbc7 ntdll!ExecuteHandler+0x24
0f 068ff2a4 77446b67 ntdll!RtlDispatchException+0x127
10 068ff2a4 015989f4 ntdll!KiUserExceptionDispatcher+0xf
11 068ff750 00f589f5 trigger::to_chunks$_ResumeCoro$2<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std:air<HKEY__ *,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > > >+0x284 [D:\jenkins\workspace\winagent-branch-build-fast\Location\RegistryChangeTrigger.cpp @ 25]
Continue reading...