]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/ceph_argparse: avoid int overflow 33101/head
authorKefu Chai <kchai@redhat.com>
Fri, 7 Feb 2020 14:44:53 +0000 (22:44 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 7 Feb 2020 14:44:54 +0000 (22:44 +0800)
commit711d8761849d2e252ebd72cba0784d0ee067b3ab
treef8acc13b87bd706c5e96cd562a83a64b65a7344f
parent3fe229e9815525b975571bba116e65e1c052921e
pybind/ceph_argparse: avoid int overflow

in python 2.6.8, `thread.join(timeout)` tries to convert the given
timeout to PyTime, but turns out `2 << 32` overflows when python
runtime converts the timeout from sec to ns. that's why
the `lock.acquire()` call always fail in
`Thread._wait_for_tstate_lock()`.
and we end up with an alive thread after calling `thread.join()`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/ceph_argparse.py