-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-28129: fix ctypes crashes #386
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
Conversation
… __get__, and some additions to from_buffer and from_buffer_copy
…129-fix-ctypes-crashes
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow these steps to help rectify the issue:
Thanks again to your contribution and we look forward to looking at it! |
I signed the CLA half a year ago, but only now added my GitHub username to
my details at bpo.
On Thu, Mar 2, 2017 at 1:57 AM the-knights-who-say-ni < ***@***.***> wrote:
Hello, and thanks for your contribution!
I'm a bot set up to make sure that the project can legally accept your
contribution by verifying you have signed the PSF contributor agreement
<https://www.python.org/psf/contrib/contrib-form/> (CLA).
Unfortunately we couldn't find an account corresponding to your GitHub
username on bugs.python.org (b.p.o) to verify you have signed the CLA.
This is necessary for legal reasons before we can look at your
contribution. Please follow these steps to help rectify the issue:
1. If you don't have an account on b.p.o, please create one
***@***.***=register>
2. Make sure your GitHub username is listed in "Your Details" at b.p.o
<https://cloud.githubusercontent.com/assets/2680980/23276970/d14a380c-f9d1-11e6-883d-e13b6b211239.png>
3. If you have not already done so, please sign the PSF contributor
agreement <https://www.python.org/psf/contrib/contrib-form/>. The "
bugs.python.org username " requested by the form is the "Login name"
field under "Your Details".
4. If you just signed the CLA, please *wait at least one US business
day* and then check "Your Details" on bugs.python.org to see if your
account has been marked as having signed the CLA (the delay is due to a
person having to manually check your signed CLA)
5. Reply here saying you have completed the above steps
Thanks again to your contribution and we look forward to looking at it!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#386 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJrT9IW4Wcrd9VKQ0s6gIQ_WCeW-_1hmks5rhgXegaJpZM4MQXoD>
.
--
…-Oren
|
assert(CDataObject_Check(inst)); | ||
if (!CDataObject_Check(inst)) { | ||
PyErr_SetString(PyExc_TypeError, | ||
"not a ctype instance"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctypes with a S no?
assert(CDataObject_Check(inst)); | ||
if (!CDataObject_Check(inst)) { | ||
PyErr_SetString(PyExc_TypeError, | ||
"not a ctype instance"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctypes with a S no?
"I signed the CLA half a year ago, but only now added my GitHub username to my details at bpo." Fixed. I removed the red "CLA not signed" label, and the bug added the green "CLA signed" label. |
replaced 'ctype' with 'ctypes' in my patches, and also in an error message in Modules/_ctypes/_ctypes.c |
I'm sorry, it seems like "ctype" is the correct name. I found it in other parts of the code, but not in the doc. Please remove or revert the new change. |
in https://docs.python.org/3.7/library/ctypes.html, the term 'ctypes instance' is used 9 times, while what code persuaded you "ctype" is the correct name? I searched for ctype as a whole word in all *.c, *.h, *.py files, and most of what I found was |
In Modules/_ctypes/_ctypes.c, I found:
functions
---------
sizeof(cdata)
- return the number of bytes the buffer contains
sizeof(ctype)
- return the number of bytes the buffer of an instance would contain
|
Coverity found three potential NULL deref. One is a false positive, the remaining two are handled in #403. |
* init commit, with initial tests for from_param and fields __set__ and __get__, and some additions to from_buffer and from_buffer_copy * added the rest of tests and patches. probably only a first draft. * removed trailing spaces * replace ctype with ctypes in error messages * change back from ctypes instance to ctype instance (cherry picked from commit 1bea762)
* init commit, with initial tests for from_param and fields __set__ and __get__, and some additions to from_buffer and from_buffer_copy * added the rest of tests and patches. probably only a first draft. * removed trailing spaces * replace ctype with ctypes in error messages * change back from ctypes instance to ctype instance (cherry picked from commit 1bea762)
bpo-28129: