[Bug 1620754] Re: hash(datetime.datetime(...)) fails with python3.5 on armhf (on an arm64 host) with a bus error

Matthias Klose doko at ubuntu.com
Fri Sep 9 16:37:41 UTC 2016


the datetime type is defined as

#define _PyTZINFO_HEAD          \
    PyObject_HEAD               \
    Py_hash_t hashcode;         \
    char hastzinfo;             /* boolean flag */

typedef struct
{
    _PyTZINFO_HEAD
    unsigned char data[_PyDateTime_DATE_DATASIZE];
} PyDateTime_Date;

and data is used to calculate the hash of the object, not being 4 byte
aligned, you get the bus error. Inserting three fill bytes, are making
the data member 4-byte aligned solves the issue, however introducing an
ABI change makes the new datetime ABI incompatible.  For now I don't
know a solution to make that change and keep the ABI compatible.

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-cryptography in Ubuntu.
https://bugs.launchpad.net/bugs/1620754

Title:
  hash(datetime.datetime(...)) fails with python3.5 on armhf (on an
  arm64 host) with a bus error

Status in python-cryptography package in Ubuntu:
  New
Status in python3.5 package in Ubuntu:
  New

Bug description:
  seen with
  https://launchpad.net/ubuntu/+source/python-cryptography/1.4-2/+build/10476934
  https://launchpad.net/ubuntu/+source/python-cryptography/1.5-1/+build/10678695

  the TestInvalidityDate.test_invalid_invalidity_date test is the first
  one to fail with a bus error. No reasonable traceback from gdb.

  Trying to build python3.5, python-cffi and python-cryptography with
  -mno-unaligned-access doesn't fix the issue (buildds running on a
  64bit kernel).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-cryptography/+bug/1620754/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list