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

Fix slot array corrupted by wrenInterpret() #730

Merged
merged 1 commit into from Jun 14, 2020

Conversation

ayuusweetfish
Copy link
Contributor

Fixes #710 (discussions happen there) and add a test case. Credit largely goes to @liquid600pgm for providing detailed analysis.

@mhermier
Copy link
Contributor

mhermier commented Feb 10, 2020 via email

@ayuusweetfish
Copy link
Contributor Author

Yes, but slot manipulation between multiple wrenInterpret() calls could be a common usage, so a dedicated test can be a good idea. Other similar issues I know involve some kind of re-entrancy (invoking Wren API inside foreign methods).

@mhermier
Copy link
Contributor

mhermier commented Feb 10, 2020 via email

@ayuusweetfish
Copy link
Contributor Author

Indeed, it can be difficult to ensure test coverage for similar issues.

Maybe tests for unfixed issues should be added when they get understood more and fixed. Before that, black-box tests emulating common usage patterns can partly fulfill the need.

@mhermier
Copy link
Contributor

mhermier commented Feb 10, 2020 via email

@mhermier
Copy link
Contributor

mhermier commented Feb 10, 2020 via email

@ruby0x1 ruby0x1 added the 0.4.0 The 0.4.0 tag release label Feb 10, 2020
@ayuusweetfish
Copy link
Contributor Author

I meant that the API needs to be changed.

The API related to slot array or something else? Would be interested to hear your reasons.

@mhermier
Copy link
Contributor

mhermier commented Feb 11, 2020 via email

@ruby0x1 ruby0x1 closed this Jun 12, 2020
@ruby0x1 ruby0x1 reopened this Jun 13, 2020
@ruby0x1 ruby0x1 changed the base branch from master to main June 13, 2020 21:19
@ruby0x1 ruby0x1 closed this Jun 13, 2020
@ruby0x1 ruby0x1 reopened this Jun 13, 2020
@ruby0x1 ruby0x1 merged commit 344d343 into wren-lang:main Jun 14, 2020
@ruby0x1
Copy link
Member

ruby0x1 commented Jun 14, 2020

Thanks @kawa-yoiko this is a good step forward, and thanks to @liquid600pgm too.

mhermier added a commit to mhermier/wren that referenced this pull request Jun 14, 2020
mhermier added a commit to mhermier/wren that referenced this pull request Jun 15, 2020
mhermier added a commit to mhermier/wren that referenced this pull request Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.4.0 The 0.4.0 tag release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling wrenEnsureSlots before wrenInterpret causes apiStack to become invalid
3 participants