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

Reapply simplification of memory handling with generics. #334

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

thetorpedodog
Copy link
Contributor

This reverts #331 and #330, thus reintroducing #248 and #321.

The issue in those changes was that when attempting to copy a null/zero-length string, we would do something like C.GoStringN(nil, 0) or maybe C.GoStringN(someInvalidAddress, 0). Either of those should (in theory) give you a zero-length string, but in practice we want to manually check (as the code did before I removed that check). The check remained present in the other uses, since they all had an equivalent check before their copying operation in getValueInternal.

This change is also currently running through a server-side test suite.

@thetorpedodog
Copy link
Contributor Author

The test I just added fails without the fix (i.e., commit 2a546a8) and passes with it.

@thetorpedodog thetorpedodog merged commit ddbb6d7 into master Jul 17, 2024
7 checks passed
ypatia added a commit that referenced this pull request Jul 19, 2024
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