◐ Shell
clean mode source ↗

gh-46376: add (failing) tests for ctypes/pointer/cast/set_contents by code-of-kpp · Pull Request #108519 · python/cpython

@s1kpp

Previous attempt to fix pythongh-46376 was incomplete and
overall it didn't succeed, and was reverted in 3.11.
However, we have discovered some dangerous issues with
ctypes, that aren't fixed or documented anywhere.
This commit adds tests (@expectedfailure) so at least
developers are aware of situations where memory might
be corrupted, leaked or when changing a pointer value
might have no effect.
Hopefully, we should be able to remove @expectedfailure
in the future, with new shiny ctypes implementation or
at least a bugfix.