[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2021-01-14 Thread Petr Viktorin


Change by Petr Viktorin :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2021-01-12 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 187f76def8a5bd0af7ab512575cad30cfe624b05 by Petr Viktorin in 
branch '3.8':
[3.8] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) 
(GH-24120)
https://github.com/python/cpython/commit/187f76def8a5bd0af7ab512575cad30cfe624b05


--

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2021-01-05 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +22951
pull_request: https://github.com/python/cpython/pull/24120

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2021-01-05 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 6e72ab909de58e89b5a7cd6899587e203cf129a3 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) 
(GH-24005)
https://github.com/python/cpython/commit/6e72ab909de58e89b5a7cd6899587e203cf129a3


--

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-12-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22847
pull_request: https://github.com/python/cpython/pull/24005

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-12-29 Thread miss-islington


miss-islington  added the comment:


New changeset 056c08211b402b4dbc1530a9de9d00ad5309909f by Petr Viktorin in 
branch 'master':
bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999)
https://github.com/python/cpython/commit/056c08211b402b4dbc1530a9de9d00ad5309909f


--
nosy: +miss-islington

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-12-29 Thread Petr Viktorin


Change by Petr Viktorin :


--
nosy: +petr.viktorin
nosy_count: 4.0 -> 5.0
pull_requests: +22841
pull_request: https://github.com/python/cpython/pull/23999

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-26 Thread Matej Cepl


Change by Matej Cepl :


--
nosy: +mcepl
nosy_count: 3.0 -> 4.0
pull_requests: +18539
pull_request: https://github.com/python/cpython/pull/19179

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-24 Thread Andreas Schneider


Andreas Schneider  added the comment:

I forgot, for detecting alignment issues or strict aliasing and this also falls 
under strict aliasing, you need to turn on optimizations.

clang -O2 -Werror -Wcast-align ...

--

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-24 Thread Andreas Schneider


Andreas Schneider  added the comment:

clang -Werror -Wcast-align ...

rpm -q clang9
clang9-9.0.1-8.1.x86_64

Does that help? Found in CI of

https://gitlab.com/cwrap/pam_wrapper

--

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-24 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hi! I cannot reproduce the error. Could you provide the way to reproduce?

thanks

--
nosy: +eamanu

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-24 Thread Andreas Schneider


Change by Andreas Schneider :


--
type:  -> compile error
versions: +Python 3.8

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-24 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +18494
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19133

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-24 Thread Andreas Schneider


New submission from Andreas Schneider :

In file included from /builds/cryptomilk/pam_wrapper/src/python/pypamtest.c:21:
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.


The correct way to do it would be:

union {
   char *data;
   vectorcallfunc *ptr;
} vc;

vc.data = (char *)callable + offset;
return *vc.ptr;

--
components: C API
messages: 364919
nosy: asn
priority: normal
severity: normal
status: open
title: Incorrect pointer alignment in _PyVectorcall_Function() of 
cpython/abstract.h

___
Python tracker 

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