Skip to content

fix use set more than once,will crash #13

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

Closed
wants to merge 1 commit into from

Conversation

uniontech-lisa
Copy link

Fix that when using the same instance of stub, piling the same function twice, calling set (inconsistent piling functions twice), decomposing the instance of stub, or calling reset with the same instance of stub, restoring the previous function address is the function address of the first piling, not the original function address, which may cause crash and inconsistent with the expected result. Only the original address is saved every time.

…on twice, calling set (inconsistent piling functions twice), decomposing the instance of stub, or calling reset with the same instance of stub, restoring the previous function address is the function address of the first piling, not the original function address, which may cause crash and inconsistent with the expected result. Only the original address is saved every time.
@coolxv
Copy link
Owner

coolxv commented Aug 25, 2021

Thanks, bug fixed. Modify to call reset() on each set(). #14

@coolxv coolxv closed this Aug 25, 2021
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.

2 participants