Skip to content

Fix incorrect bindings for enum value descriptors #108

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

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

Image for: Conversation
Copy link
Contributor

mkruskal-google commented Feb 11, 2025

This happens to work today because the memory layout of EnumDescriptor and EnumValueDescriptor match. If this changes (which it will in a coming release), it results in memory corruption and UB.

Copy link
Owner

Thanks for taking the time to send a PR!

Would you mind adding a ChangeLog entry? C-x 4 a in Emacs, otherwise maybe look at existing entries. Two spaces between fields in the header line.

Copy link
Contributor Author

Sure thing, thanks for the quick response!

eddelbuettel merged commit 4d94f4c into eddelbuettel:master Feb 11, 2025
2 checks passed
eddelbuettel pushed a commit that referenced this pull request Feb 11, 2025
* Fix incorrect FFI bindings for enum value descriptors

* Add changelog
mkruskal-google deleted the ffi-binding-fix branch February 11, 2025 15:56
Copy link
Owner

Small postscriptum: What was added to init.c assumed a one-argument function, but has two. R-devel CMD check will not be fooled. 😉 Will fix now.

eddelbuettel added a commit that referenced this pull request Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants