From 27e570de343590fb99a1d9862668ab13843e42be Mon Sep 17 00:00:00 2001 From: Evgeny Pavlov Date: Wed, 27 Jul 2016 16:27:17 +0300 Subject: [PATCH] Add flag to check re-entrancy of JIT notification --- src/vm/util.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vm/util.cpp b/src/vm/util.cpp index 703564e2f2..3ce26d6653 100644 --- a/src/vm/util.cpp +++ b/src/vm/util.cpp @@ -3361,6 +3361,7 @@ void InitializeClrNotifications() #if defined(FEATURE_GDBJIT) #include "gdbjit.h" +__declspec(thread) bool tls_isSymReaderInProgress = false; #endif // FEATURE_GDBJIT // called from the runtime @@ -3375,7 +3376,12 @@ void DACNotify::DoJITNotification(MethodDesc *MethodDescPtr) } CONTRACTL_END; #if defined(FEATURE_GDBJIT) && defined(FEATURE_PAL) && !defined(CROSSGEN_COMPILE) - NotifyGdb::MethodCompiled(MethodDescPtr); + if(!tls_isSymReaderInProgress) + { + tls_isSymReaderInProgress = true; + NotifyGdb::MethodCompiled(MethodDescPtr); + tls_isSymReaderInProgress = false; + } #endif TADDR Args[2] = { JIT_NOTIFICATION, (TADDR) MethodDescPtr }; DACNotifyExceptionHelper(Args, 2); -- 2.34.1