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

OS#13255723, OS#13255732, OS#13255734, OS#13255735, OS#13255737: A few more uninitialized locals. #3646

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

LouisLaf
Copy link
Collaborator

@LouisLaf LouisLaf commented Sep 6, 2017

Fixed a few more benign cases.

…w more uninitialized locals.

Fixed a few more benign cases.
@@ -178,7 +178,7 @@ void IntBounds::SetBound(

// Aggressively merge the constant lower or upper bound of the base value, adjusted by the offset
ValueInfo const * const baseValueInfo = baseValue->GetValueInfo();
int constantBoundBase;
int constantBoundBase = 0xCCCCCCCC;
Copy link
Collaborator

Choose a reason for hiding this comment

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

0xCCCCCCCC [](start = 28, length = 10)

Why these value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't find a default that made sense for these. 0 is often a bad choice, MIN/MAX_INT were not great.

0xCCCCCCCC has a few good properties:
o Negative
o Bad pointer
o INT 3 on x86/x64
o Easy to spot in the debugger
o That's what VC uses to initialize the stack with -RTC1

Copy link
Contributor

@Penguinwizzard Penguinwizzard left a comment

Choose a reason for hiding this comment

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

LGTM

@chakrabot chakrabot merged commit b2e4402 into chakra-core:master Sep 6, 2017
chakrabot pushed a commit that referenced this pull request Sep 6, 2017
…55735, OS#13255737: A few more uninitialized locals.

Merge pull request #3646 from LouisLaf:uninit

Fixed a few more benign cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants