Bug ID 1167501
Summary Invalid alignment in Pyhton 3.8 cpython header
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee screening-team-bugs@suse.de
Reporter asn@cryptomilk.org
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

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.

union {
   vectorcallfunc *ptr;



The correct way to do it would be:

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

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


You are receiving this mail because: