Add PyDateTime_IMPORT to module initialization function.#18
Closed
aebruno wants to merge 1 commit intorjancewicz:masterfrom
Closed
Add PyDateTime_IMPORT to module initialization function.#18aebruno wants to merge 1 commit intorjancewicz:masterfrom
aebruno wants to merge 1 commit intorjancewicz:masterfrom
Conversation
Was experiencing segfaults when accessing datetime fields on the
PyKAdminPrincipalObject, for example, calls to function
PyKAdminPrincipal_get_expire(..) resulted in a segfault.
Example code resulting in segfault:
import kadmin
kadm = kadmin.init_with_keytab("user@example.com", "/path/to/keytab")
princ = kadm.get_principal("user@example.com")
print princ.expire
However, if imported datetime module first, all is well:
import kadmin
import datetime
kadm = kadmin.init_with_keytab("user@example.com", "/path/to/keytab")
princ = kadm.get_principal("user@example.com")
print princ.expire
This suggested datetime wasn't being initialized properly. Adding this
patch to ensure Py_DateTime is initialized as part of the module
initialization fixed the segfaults.
Owner
|
It would appear that you have forked from a much older branch. Please rebase off the current master and try the test again. I am unable to reproduce the error. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was experiencing segfaults when accessing datetime fields on the
PyKAdminPrincipalObject, for example, calls to function
PyKAdminPrincipal_get_expire(..) resulted in a segfault.
Example code resulting in segfault:
import kadmin
kadm = kadmin.init_with_keytab("user@example.com", "/path/to/keytab")
princ = kadm.get_principal("user@example.com")
print princ.expire
However, if imported datetime module first, all is well:
import kadmin
import datetime
kadm = kadmin.init_with_keytab("user@example.com", "/path/to/keytab")
princ = kadm.get_principal("user@example.com")
print princ.expire
This suggested datetime wasn't being initialized properly? Adding this
patch to ensure Py_DateTime is initialized as part of the module
initialization fixed the segfaults.