Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 028ad32

Browse files
Fix SuperPMI assertion call in MethodContext::recGetHelperFtn() (#90778)
* Fix SuperPMI assertion call in `MethodContext::recGetHelperFtn()` We can't use string concatenation in an argument to the `AssertCodeMsg` macro, so construct the string we want to print first. * Feedback
1 parent e6f3f0c commit 028ad32

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/coreclr/tools/superpmi/superpmi-shared/errorhandling.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void MSC_ONLY(__declspec(noreturn)) ThrowRecordedException(DWORD innerExceptionC
3434
do \
3535
{ \
3636
if (!(expr)) \
37-
LogException(exCode, "SuperPMI assertion '%s' failed (" #msg ")", #expr, ##__VA_ARGS__); \
37+
LogException(exCode, "SuperPMI assertion '%s' failed (" msg ")", #expr, ##__VA_ARGS__); \
3838
} while (0)
3939

4040
#define AssertCode(expr, exCode) \

src/coreclr/tools/superpmi/superpmi-shared/logging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
do \
3131
{ \
3232
Logger::LogExceptionMessage(__FUNCTION__, __FILE__, __LINE__, exCode, msg, __VA_ARGS__); \
33-
ThrowSpmiException(exCode, msg, __VA_ARGS__); \
33+
ThrowSpmiException(exCode, msg, __VA_ARGS__); \
3434
} while (0)
3535

3636
// These are specified as flags so subsets of the logging functionality can be enabled/disabled at once

src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,7 @@ void MethodContext::recGetHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection
23652365
DLDL oldValue = GetHelperFtn->Get(key);
23662366

23672367
AssertCodeMsg(oldValue.A == value.A && oldValue.B == oldValue.B, EXCEPTIONCODE_MC,
2368-
"collision! old: %016" PRIX64 " %016" PRIX64 ", new: %016" PRIX64 " %016" PRIX64 " \n", oldValue.A, oldValue.B, value.A,
2368+
"collision! old: %016" PRIX64 " %016" PRIX64 ", new: %016" PRIX64 " %016" PRIX64, oldValue.A, oldValue.B, value.A,
23692369
value.B);
23702370
}
23712371

0 commit comments

Comments
 (0)