Skip to content

Commit

Permalink
Avoid unnecessary handling in _ReportUnobservedException (#3909)
Browse files Browse the repository at this point in the history
Co-authored-by: Casey Carter <[email protected]>
Co-authored-by: Stephan T. Lavavej <[email protected]>
  • Loading branch information
3 people authored Aug 1, 2023
1 parent 19528fa commit fc444ce
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions stl/src/ppltasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ namespace Concurrency {

namespace details {
[[noreturn]] _CRTIMP2 void __cdecl _ReportUnobservedException() {

#if (defined(_M_IX86) || defined(_M_X64)) && !defined(_CRT_APP)
if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
#endif
{
__fastfail(FAST_FAIL_INVALID_ARG);
#if (defined(_M_IX86) || defined(_M_X64)) && !defined(_CRT_APP) && _STL_WIN32_WINNT < _WIN32_WINNT_WIN8
if (!IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE)) {
std::abort();
}
#endif // ^^^ __fastfail conditionally available ^^^

std::terminate();
__fastfail(FAST_FAIL_INVALID_ARG);
}

namespace platform {
Expand Down

0 comments on commit fc444ce

Please sign in to comment.