Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Update src/coreclr/vm/ilstubresolver.cpp
  • Loading branch information
jkoritzinsky authored Jun 24, 2021
commit b5313e2c459e7ad2b4859db184efb93b8d249fb4
1 change: 0 additions & 1 deletion src/coreclr/vm/ilstubresolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ ILStubResolver::AllocGeneratedIL(
{
NewArrayHolder<BYTE> pNewILCodeBuffer = new BYTE[cbCode];
NewHolder<CompileTimeState> pNewCompileTimeState = new CompileTimeState{};
Copy link
Member

Choose a reason for hiding this comment

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

For my education - does new CompileTimeState{} allocate the space without calling any constructor?

Copy link
Member Author

@jkoritzinsky jkoritzinsky Jun 24, 2021

Choose a reason for hiding this comment

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

Good catch. It actually zero-inits, so I can remove the memset on the next line.

memset(pNewCompileTimeState, 0, sizeof(CompileTimeState));
NewArrayHolder<BYTE> pNewLocalSig = NULL;

if (0 != cbLocalSig)
Expand Down