-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
ci(cunit): set generic argument and return types #125
Conversation
Codecov ReportBase: 69.16% // Head: 69.75% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## devel #125 +/- ##
==========================================
+ Coverage 69.16% 69.75% +0.58%
==========================================
Files 23 23
Lines 2384 2394 +10
Branches 696 697 +1
==========================================
+ Hits 1649 1670 +21
+ Misses 416 405 -11
Partials 319 319
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
49f8acd
to
50d7a25
Compare
46d96d6
to
09deb5f
Compare
46cff25
to
11b2805
Compare
Closing because it doesn't seem to actually work around actions/setup-python#442. |
23d1778
to
0ff07a7
Compare
0ff07a7
to
72d12d8
Compare
@dsame I'm tagging you in case you'd be interested in the current solution, which is based on your valuable analysis 🙇 . |
Description of the Change
Depending on how Python is compiled on certain architectures, not giving types to C functions using
ctypes
can lead to mangled values (e.g. a 64-bit pointer having its top 32 bits set to 1). This is a highly likely source of segmentation faults, and they were discovered using the Python builds from the setup-python action.With this change, we ensure that all arguments and return values get a default type. We use
c_void_p
for any pointer andc_long
for any non-pointer argument/return value, to ensure that the passed bits are not altered by unwanted conversions.Alternate Designs
N. A.
Regressions
N. A.
Verification Process
Existing test suite.