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

Account for Truncated Signatures in a JITServerHelpers Assertion #20883

Merged
Merged
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
10 changes: 9 additions & 1 deletion runtime/compiler/control/JITServerHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,15 @@ packCallback(const J9ROMClass *romClass, const J9SRP *origSrp, const char *slotN
if (dst == ctx._cursor)
ctx._cursor += copyUTF8((J9UTF8 *)dst, str, it->second.second/*truncate*/ ? ctx._generatedPrefixLength : 0);
else
TR_ASSERT((dst < ctx._cursor) && (memcmp(dst, str, J9UTF8_TOTAL_SIZE(str)) == 0), "Must be already copied");
TR_ASSERT(
(dst < ctx._cursor) && (
(it->second.second && (memcmp(utf8Data((J9UTF8 *) dst),
utf8Data((J9UTF8 *) str),
ctx._generatedPrefixLength) == 0)) ||
(!it->second.second && (memcmp(dst, str, J9UTF8_TOTAL_SIZE(str)) == 0))
),
"Must be already copied"
);
}

static void
Expand Down