Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
fix: abort conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku committed Jun 18, 2022
1 parent 356220f commit 4f31ba8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/ucrt/misc/terminate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

#include <corecrt_internal.h>
#include <corecrt_terminate.h>
#include <vcstartup_internal.h>


// fix: abort not implemented after 19043
// alternatename: https://devblogs.microsoft.com/oldnewthing/20200731-00/?p=104024
extern "C" void __cdecl _abort_default();
_VCRT_DECLARE_ALTERNATE_NAME(abort, _abort_default);


static terminate_handler __cdecl get_terminate_or_default(
__acrt_ptd const* const ptd
Expand Down
5 changes: 1 addition & 4 deletions src/ucrt/startup/abort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*******************************************************************************/

#include <corecrt_internal.h>
#include <signal.h>
#include <stdlib.h>

#ifdef _DEBUG
Expand Down Expand Up @@ -43,8 +42,7 @@ extern "C" unsigned int __abort_behavior = _INIT_ABORT_BEHAVIOR;
*
*******************************************************************************/

#if (WDK_NTDDI_VERSION >= NTDDI_WIN10_FE)
extern "C" void __cdecl abort()
extern "C" void __cdecl _abort_default()
{
#ifdef _DEBUG
if (__abort_behavior & _WRITE_ABORT_MSG)
Expand All @@ -60,7 +58,6 @@ extern "C" void __cdecl abort()

__fastfail(FAST_FAIL_FATAL_APP_EXIT);
}
#endif // WDK_NTDDI_VERSION >= NTDDI_WIN10_FE

/***
*unsigned int _set_abort_behavior(unsigned int, unsigned int) - set the behavior on abort
Expand Down

0 comments on commit 4f31ba8

Please sign in to comment.