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

Implement index out of range checks #75

Merged
merged 2 commits into from Jun 24, 2019

Conversation

Projects
None yet
2 participants
@quajak
Copy link
Member

commented Feb 1, 2019

No description provided.

@charlesbetros
Copy link
Contributor

left a comment

Please add some tests to validate your changes.

@@ -25,7 +25,29 @@ public static void Assemble(Assembler aAssembler, uint aElementSize, bool isSign
{
// stack = index
// stack + 2 = array
DoNullReferenceCheck(aAssembler, debugEnabled, 8);
// null reference check is done in ldlen

This comment has been minimized.

Copy link
@charlesbetros

charlesbetros May 11, 2019

Contributor

The pattern we use for loading references/pointers is to do the null check at the beginning.

This comment has been minimized.

Copy link
@quajak

quajak May 11, 2019

Author Member

Ok changed it

@quajak

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

For tests see CosmosOS/Cosmos#1165

@charlesbetros charlesbetros merged commit b322475 into CosmosOS:master Jun 24, 2019

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.