-
Notifications
You must be signed in to change notification settings - Fork 75
Test with PYTHON_JULIACALL_HANDLE_SIGNALS=yes #642
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
If this works, I don't fully understand why, because we never seem to actually ever dereference a whole Perhaps it's a bug in UnsafePointers.jl. |
0f736a6
to
d3384ff
Compare
OK good - what I did didn't actually fix the problem, the bus error persists, so I have reverted the commit. Testing all minor versions of Python to see how bad this is. |
Python 3.8 is EOL, likely good to remove anyways? pip will resolve to an earlier version of juliacall anyways, should someone want it. And that version would still be compatible with the old python type. |
4f3f872
to
052df20
Compare
Some trivial changes resulted in segfaults on linux on Python 3.9 and 3.11. Reverting those to see what happens. |
Yep agreed - I do aim to only support supported Python versions, just hadn't spotted that 3.8 was EOL now. |
After reverting, everything passed. Undoing the revert again... |
|
||
# Python 3.13+ fields | ||
tp_versions_used::Cushort = 0 | ||
versions_used::UInt16 = 0 |
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.
julia> Cushort === UInt16
true
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.
Not necessarily on all systems.
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.
Oh I see, sorry.
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.
Out of curiosity, which systems would this actually not be true for?
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.
In Julia the "C*" aliases are best guesses based on observed experience of common compilers (mainly gcc and clang), and in this specific case Cushort is indeed always UInt16: https://github.com/JuliaLang/julia/blob/11eeed32e8fe3cd24c8439fbe2220d3f4183f306/base/ctypes.jl#L27. But the reality is that the C standard doesn't specify fixed size for types, and leaves the implementation up to compilers which can do what the heck they want. "short" is only expected to be at least 16 bits, but a compiler making "short" 17 bits could be fully standard-compliant.
Now just Ubuntu Python 3.9 failing (segfault). Rerunning... |
All passed after rerunning. I think the real issue is just that we didn't add |
Cool; makes sense |
Hopefully fixes this issue: #641 (comment)