[issue23020] New matmul operator crashes modules compiled with CPython3.4

2015-07-05 Thread Antoine Pitrou

Antoine Pitrou added the comment:

There was probably an informal best effort ABI compatibility in 2.x that we 
de facto dropped in 3.x. Otherwise, as Amaury points out, several 
Py_TPFLAGS_HAVE_XXX flags would have no purpose.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2015-07-04 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
priority: release blocker - normal
stage:  - needs patch
type: crash - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2015-06-18 Thread Tal Einat

Changes by Tal Einat talei...@gmail.com:


--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-10 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

PEP384 is presented as a new way to write modules that can be loaded by 
multiple Python versions, specially on Windows.
I could not find any place that says that modules not using the stable ABI need 
to be recompiled.

I'm not against changing this rule (after all, I started on Windows platform 
where all this discussion does not apply), but it should be clearly stated 
somewhere in the API docs, and also in the whatsnew pages (all of them?)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-10 Thread Benjamin Peterson

Benjamin Peterson added the comment:

This is why C-extensions' PEP 3147 file tags depend on Python version.

I agree the policy could stand to be documented.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc:

When an extension module is compiled with CPython3.4, the nb_matrix_multiply 
slot is not filled, and no memory is allocated for it.
If the extension module is imported by CPython3.5, nb_matrix_multiply contains 
garbage and segfaults the interpreter.

In Python 2.7 there are flags like Py_TPFLAGS_HAVE_INDEX to gate the access  to 
recently added slots. I think Python3.5 should have a similar one.

--
messages: 232372
nosy: amaury.forgeotdarc, benjamin.peterson
priority: normal
severity: normal
status: open
title: New matmul operator crashes modules compiled with CPython3.4
type: crash

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
priority: normal - release blocker
versions: +Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Here is a test module that segfaults on Python3.5.
It's derived from _testcapi, but it can be anything with a PyNumberMethods.

I compiled with
gcc -g -I path/to/cpython3.4/Include/ -I /path/to/cpython3.4 mytest.c -fPIC 
--shared -o mytest.so

Then I ran python3.5 and:
import mytest
print(mytest.matmulType() @ 1)

When the module is compiled with 3.5, TypeError is correctly raised.

--
Added file: http://bugs.python.org/file37397/mytest.c

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Benjamin Peterson

Benjamin Peterson added the comment:

This technically falls under the fact that we don't have ABI compatibility 
between 3.N and 3.(N + 1).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Oh, has this ABI compatibility requirement changed from the 2.x series?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Benjamin Peterson

Benjamin Peterson added the comment:

We never had compatibility between 2.N and 2.(N + 1) either.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

I would not mind the change, but I've always thought the opposite (except on 
Windows, where the string Python27.dll is stored in the .pyd)

There are traces of this binary compatibility still today in the 3.4 headers:
https://hg.python.org/cpython/file/v3.4.0/Include/pymem.h#l23
...if you do use the macros you must recompile your extensions with each 
Python release...
Which seems to imply that extensions usually don't need to be recompiled!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +lemburg, loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23020] New matmul operator crashes modules compiled with CPython3.4

2014-12-09 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

Extensions need not to be rebuilt only when using stable ABI:
https://www.python.org/dev/peps/pep-0384/

But mytest.c fails to build with -DPy_LIMITED_API so it uses features from 
outside of stable ABI and must be rebuilt.

--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com