-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Multicorejit unification #48326
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
Multicorejit unification #48326
Changes from 1 commit
ed6862b
95de184
26e631a
0081de5
cd2820f
4a3c5d2
f8af3e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1161,7 +1161,7 @@ HRESULT MulticoreJitProfilePlayer::PlayProfile() | |
| unsigned data1 = * (const unsigned *) pBuffer; | ||
| unsigned rcdTyp = data1 >> RECORD_TYPE_OFFSET; | ||
| unsigned rcdLen = 0; | ||
|
|
||
| if (rcdTyp == MULTICOREJIT_MODULE_RECORD_ID) | ||
| { | ||
| rcdLen = data1 & 0xFFFFFF; | ||
|
|
@@ -1176,6 +1176,12 @@ HRESULT MulticoreJitProfilePlayer::PlayProfile() | |
| } | ||
| else if (rcdTyp == MULTICOREJIT_GENERICMETHOD_RECORD_ID) | ||
| { | ||
| if (nSize < sizeof(unsigned) + sizeof(unsigned short)) | ||
| { | ||
| hr = COR_E_BADIMAGEFORMAT; | ||
| break; | ||
| } | ||
|
|
||
| unsigned signatureLength = * (const unsigned short *) (((const unsigned *) pBuffer) + 1); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems to be the intention in this part to check if there is enough space in the remaining buffer before decoding. From the loop condition we know that there is a
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
| DWORD dataSize = signatureLength + sizeof(DWORD) + sizeof(unsigned short); | ||
| dataSize = AlignUp(dataSize, sizeof(DWORD)); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The additional comments below are no longer valid, could be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed