Re: PL/Python fails on new NetBSD/PPC 8.0 install

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: PL/Python fails on new NetBSD/PPC 8.0 install
Дата
Msg-id CA+hUKGKAgZsjDdc0afuf2pB8+aOc2Tm4RHbi9R02OdEciQQLGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PL/Python fails on new NetBSD/PPC 8.0 install  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PL/Python fails on new NetBSD/PPC 8.0 install  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PL/Python fails on new NetBSD/PPC 8.0 install  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PL/Python fails on new NetBSD/PPC 8.0 install  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Oct 30, 2019 at 9:25 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> What I'm inclined to do is go file a bug report saying that this
> behavior contradicts both POSIX and NetBSD's own man page, and
> see what they say about that.

From a quick look at the relevant trees, isn't the problem here that
cpython thinks it can reserve pthread_t value -1 (or rather, that
number cast to unsigned long, which is the type it uses for its own
thread IDs):

https://github.com/python/cpython/blob/master/Include/pythread.h#L21

... and then use that to detect lack of initialisation:

https://github.com/python/cpython/blob/master/Modules/_threadmodule.c#L1149

... and that NetBSD also chose the same arbitrary value for their
threading stub library:

https://github.com/NetBSD/src/blob/trunk/lib/libc/thread-stub/thread-stub.c#L392

... as they are entirely within their rights to do?  Assuming the stub
library can do whatever it has to do with that value, like answer
questions like pthread_equal(), as it clearly can.  I think libc is
allowed to implement pthread_t as an integer type and reserve -1, but
application code is not allowed to assume that pthread_t is even
castable to an integer type, let alone that it can reserve magic
values.

Further evidence that this is Python's fault is the admission in the
source code itself that it is "inherently hosed":

https://github.com/python/cpython/blob/master/Python/thread_pthread.h#L299



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Getting psql to redisplay command after \e
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PL/Python fails on new NetBSD/PPC 8.0 install