From 7d0480e8bd410bd589328785f98457cf3f86bb55 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 16 Feb 2019 16:53:49 +0000 Subject: [PATCH] core: increase cookie field lengths to 64-bit; closes #545. --- docs/changelog.rst | 7 +++++++ mitogen/core.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 169e4095..157ed902 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -139,6 +139,12 @@ Fixes 0.2.3 behaviour of defaulting to Kqueue in this case, but still prefer :func:`select.poll` if it is available. +* `#545 `_: an optimization + introduced in `#493 `_ caused a + 64-bit integer to be assigned to a 32-bit field on ARM 32-bit targets, + causing runs to fail. + + Core Library ~~~~~~~~~~~~ @@ -151,6 +157,7 @@ Thanks! Mitogen would not be possible without the support of users. A huge thanks for bug reports, testing, features and fixes in this release contributed by +`Fabian Arrotin `_, and `Petr Enkov `_. diff --git a/mitogen/core.py b/mitogen/core.py index dcca2e91..25732896 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -2140,7 +2140,7 @@ class Latch(object): return rsock, wsock COOKIE_MAGIC, = struct.unpack('L', b('LTCH') * (struct.calcsize('L')//4)) - COOKIE_FMT = 'Llll' + COOKIE_FMT = '>Qqqq' # #545: id() and get_ident() may exceed long on armhfp. COOKIE_SIZE = struct.calcsize(COOKIE_FMT) def _make_cookie(self):