Skip to content

Commit

Permalink
turn off activation
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov committed Jun 23, 2022
1 parent d9982bc commit e050f9b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,22 +951,22 @@ static void ActivationHandler(int code, siginfo_t* siginfo, void* context)
{
ASSERT(g_pHijackCallback != NULL);

// Only accept activations from the current process
if (siginfo->si_pid == getpid()
#ifdef HOST_OSX
// On OSX si_pid is sometimes 0. It was confirmed by Apple to be expected, as the si_pid is tracked at the process level. So when multiple
// signals are in flight in the same process at the same time, it may be overwritten / zeroed.
|| siginfo->si_pid == 0
#endif
)
{
PAL_LIMITED_CONTEXT palContext;
NativeContextToPalContext(context, &palContext);
g_pHijackCallback(&palContext, NULL);
//TODO: VS update conditionally, this is rare
UpdateNativeContextFromPalContext(context, &palContext);
}
else
// // Only accept activations from the current process
// if (siginfo->si_pid == getpid()
//#ifdef HOST_OSX
// // On OSX si_pid is sometimes 0. It was confirmed by Apple to be expected, as the si_pid is tracked at the process level. So when multiple
// // signals are in flight in the same process at the same time, it may be overwritten / zeroed.
// || siginfo->si_pid == 0
//#endif
// )
// {
// PAL_LIMITED_CONTEXT palContext;
// NativeContextToPalContext(context, &palContext);
// g_pHijackCallback(&palContext, NULL);
// //TODO: VS update conditionally, this is rare
// UpdateNativeContextFromPalContext(context, &palContext);
// }
// else
{
// Call the original handler when it is not ignored or default (terminate).
if (g_previousActivationHandler.sa_flags & SA_SIGINFO)
Expand Down

0 comments on commit e050f9b

Please sign in to comment.