]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24005)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 5 Jan 2021 15:46:58 +0000 (07:46 -0800)
committerGitHub <noreply@github.com>
Tue, 5 Jan 2021 15:46:58 +0000 (16:46 +0100)
commit6e72ab909de58e89b5a7cd6899587e203cf129a3
tree49a9596ae948de6836e434b8b885448fd82eb70e
parent9b3a53a8264d4c469a3f3d8c037e74c010be3e5c
[3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24005)

```
In file included from /usr/include/python3.8/Python.h:147:
In file included from /usr/include/python3.8/abstract.h:837:
/usr/include/python3.8/cpython/abstract.h:91:11: error: cast from 'char *' to 'vectorcallfunc *'
(aka 'struct _object *(**)(struct _object *, struct _object *const *, unsigned long, struct _object *)')
increases required alignment from 1 to 8 [-Werror,-Wcast-align]

    ptr = (vectorcallfunc*)(((char *)callable) + offset);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-Authored-By: Andreas Schneider <asn@cryptomilk.org>
Co-Authored-By: Antoine Pitrou <antoine@python.org>
(cherry picked from commit 056c08211b402b4dbc1530a9de9d00ad5309909f)
Include/cpython/abstract.h
Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst [new file with mode: 0644]
Objects/call.c