IronLanguages / IronLanguages/ironpython3
Intermittent failure in ctypes.test_random_things
Open
Nobody has claimed this yet.
module-ctypes
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
The following code intermittently fails (doesn't run in a loop in CPython.ctypes.test_random_things)
from ctypes import *
windll.kernel32.LoadLibraryA.restype = c_void_p
last_hdll = windll.kernel32.LoadLibraryA(b"kernel32")
for i in range(10000):
windll.kernel32.LoadLibraryA.restype = c_void_p
hdll = windll.kernel32.LoadLibraryA(b"kernel32")
assert hdll == last_hdll
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CPython.ctypes.test_random_things and reproduce the provided Windows LoadLibraryA loop. Investigate why repeated calls sometimes return a different handle, then ensure the test no longer fails intermittently and covers the expected handle behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100