Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 27e570d

Browse files
author
Evgeny Pavlov
committed
Add flag to check re-entrancy of JIT notification
1 parent 0fdb42a commit 27e570d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vm/util.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3361,6 +3361,7 @@ void InitializeClrNotifications()
33613361

33623362
#if defined(FEATURE_GDBJIT)
33633363
#include "gdbjit.h"
3364+
__declspec(thread) bool tls_isSymReaderInProgress = false;
33643365
#endif // FEATURE_GDBJIT
33653366

33663367
// called from the runtime
@@ -3375,7 +3376,12 @@ void DACNotify::DoJITNotification(MethodDesc *MethodDescPtr)
33753376
}
33763377
CONTRACTL_END;
33773378
#if defined(FEATURE_GDBJIT) && defined(FEATURE_PAL) && !defined(CROSSGEN_COMPILE)
3378-
NotifyGdb::MethodCompiled(MethodDescPtr);
3379+
if(!tls_isSymReaderInProgress)
3380+
{
3381+
tls_isSymReaderInProgress = true;
3382+
NotifyGdb::MethodCompiled(MethodDescPtr);
3383+
tls_isSymReaderInProgress = false;
3384+
}
33793385
#endif
33803386
TADDR Args[2] = { JIT_NOTIFICATION, (TADDR) MethodDescPtr };
33813387
DACNotifyExceptionHelper(Args, 2);

0 commit comments

Comments
 (0)