Deal with mocks that do direct referencing of instance variables.#443
Open
dmaclach wants to merge 5 commits intoerikdoe:masterfrom
Open
Deal with mocks that do direct referencing of instance variables.#443dmaclach wants to merge 5 commits intoerikdoe:masterfrom
dmaclach wants to merge 5 commits intoerikdoe:masterfrom
Conversation
c7b3b28 to
a4d7168
Compare
Contributor
Author
|
Out of all of my outstanding PRs, this is probably the one that will be the hardest to maintain and is also likely the one that will fix the most weird memory corruption issues that people can run into using OCMock. |
Contributor
Author
|
This is not a feature, but fixes potential crashing bugs, so would be a good candidate for pulling into master ASAP. |
Contributor
Author
|
Erik, are you waiting on me for anything here? This one is painful to maintain. |
This should help with spurious build failures on Travis.
Reallocate class and partial mocks based on the size of the object they are mocking. For class mocks allow direct referencing of instance variables. For Partial mocks fills the space with 0xEC and will throw an exception if we detect that an instance variable has been written to. The value 0xEB will intentionally likely cause crashes if the memory is read.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reallocate class and partial mocks based on the size of the object they are mocking.
For class mocks allow direct referencing of instance variables.
For Partial mocks fills the space with 0xEC and will throw an exception if we detect that an instance variable has been written to. The value 0xEB will intentionally likely cause crashes if the memory is read.
Potential "fix" fox #440