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

CodeQL spillStack #104376

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
6 changes: 3 additions & 3 deletions src/coreclr/utilcode/ilformatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ void ILFormatter::setTarget(size_t ilOffset, size_t depth) {
/***************************************************************************/
void ILFormatter::spillStack(OutString* out) {

for(unsigned i = 0; i < stackDepth(); i++) {
for(size_t i = 0; i < stackDepth(); i++) {
// don't bother spilling something already spilled.
if (memcmp(stackStart[i].val.val(), "@STK", 4) != 0)
*out << "@STK" << i << " = " << stackStart[i].val.val() << "\n";
*out << "@STK" << static_cast<unsigned int>(i) << " = " << stackStart[i].val.val() << "\n";
stackStart[i].val.clear();
stackStart[i].val << "@STK" << i ;
stackStart[i].val << "@STK" << static_cast<unsigned int>(i);
}
}

Expand Down
Loading