Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SuperPMI assertion call in MethodContext::recGetHelperFtn() #90778

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/tools/superpmi/superpmi-shared/errorhandling.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void MSC_ONLY(__declspec(noreturn)) ThrowRecordedException(DWORD innerExceptionC
do \
{ \
if (!(expr)) \
LogException(exCode, "SuperPMI assertion '%s' failed (" #msg ")", #expr, ##__VA_ARGS__); \
LogException(exCode, "SuperPMI assertion '%s' failed (" msg ")", #expr, ##__VA_ARGS__); \
} while (0)

#define AssertCode(expr, exCode) \
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tools/superpmi/superpmi-shared/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
do \
{ \
Logger::LogExceptionMessage(__FUNCTION__, __FILE__, __LINE__, exCode, msg, __VA_ARGS__); \
ThrowSpmiException(exCode, msg, __VA_ARGS__); \
ThrowSpmiException(exCode, msg, __VA_ARGS__); \
} while (0)

// These are specified as flags so subsets of the logging functionality can be enabled/disabled at once
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,7 @@ void MethodContext::recGetHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection
DLDL oldValue = GetHelperFtn->Get(key);

AssertCodeMsg(oldValue.A == value.A && oldValue.B == oldValue.B, EXCEPTIONCODE_MC,
"collision! old: %016" PRIX64 " %016" PRIX64 ", new: %016" PRIX64 " %016" PRIX64 " \n", oldValue.A, oldValue.B, value.A,
"collision! old: %016" PRIX64 " %016" PRIX64 ", new: %016" PRIX64 " %016" PRIX64, oldValue.A, oldValue.B, value.A,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asserts shouldn't have newlines in them

value.B);
}

Expand Down