-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Enable ctypes #6457
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
Enable ctypes #6457
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9760249
fix multiarch
youknowone b44229f
debug whats_left
youknowone fc0a34a
Remove unused ctypes/field.rs
youknowone 286a5b5
msc_info in get_version
youknowone 4bf0bac
debuggable whats_left
youknowone 79abbf0
fix ctypes
youknowone 987216b
enable ctypes
youknowone 03d6f46
Upgrade ctypes to Python v3.13.11
youknowone 7e6e0f6
test_ctypes from CPython 3.13.11
youknowone 4a35234
mark failing test_ctypes
youknowone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix ctypes
- Loading branch information
commit 79abbf0b29d5183b0885e45ea9991bd8d046d702
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1784
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 758
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 1742
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 47
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 295
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 91
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 701
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 134
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 541
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 519
🏁 Script executed:
# Check if there's a library submodule in the ctypes file head -50 crates/vm/src/stdlib/ctypes.rsRepository: RustPython/RustPython
Length of output: 1571
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 4843
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 621
🏁 Script executed:
Repository: RustPython/RustPython
Length of output: 462
Validate the handle exists before casting to dlsym.
Line 650 casts
handledirectly to*mut libc::c_voidwithout verifying it's a valid library handle in the cache. This could allow passing freed or completely invalid handles tolibc::dlsym, causing undefined behavior. Whiledlerrorchecking (lines 653–657) will catch actual dlsym failures, it doesn't prevent undefined behavior from invalid pointer casts.Add a validation check using
cache.get_lib(handle)to ensure the handle exists in the cache before passing it todlsym, and return an error if not found.🤖 Prompt for AI Agents