[New-bugs-announce] [issue37140] ctypes change made clang fail to build

Petr Viktorin report at bugs.python.org
Mon Jun 3 05:21:37 EDT 2019


New submission from Petr Viktorin <encukou at gmail.com>:

Hello,
I haven't investigated this fully yet, and won't be able to find time today. I'm forwarding the report here in case someone familiar with the code wants to take a look.

On Fedora, "clang" fails to build with Python 3.8, probably due this change (which was supposed to be Windows-only):
https://github.com/python/cpython/commit/32119e10b792ad7ee4e5f951a2d89ddbaf111cc5#diff-998bfefaefe2ab83d5f523e18f158fa4R413

According to serge_sans_paille: if ``self->b_ptr`` contains pointer, the ``memcpy`` creates sharing, and this is dangerous: if a ``__del__`` happens to free the original pointer, we end up with a dangling reference in ``new_ptr``. As far as I can tell, this is what happens in the clang bindings code.

Fedora discussion with link to logs: https://bugzilla.redhat.com/show_bug.cgi?id=1715016

----------
components: ctypes
messages: 344394
nosy: petr.viktorin
priority: normal
severity: normal
status: open
title: ctypes change made clang fail to build
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37140>
_______________________________________


More information about the New-bugs-announce mailing list