Package: pyzmq / 16.0.2-2

noncopysend-test.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 53f45c365833b855b60af4f91cfdc4149119d552 Mon Sep 17 00:00:00 2001
From: Julian Taylor <jtaylor.debian@googlemail.com>
Date: Thu, 8 Oct 2015 13:36:51 -0700
Subject: don't use uninitialized memory for test

 the memory could contain signalling NaN which crashes sparc python
Forwarded: not-needed

Patch-Name: noncopysend-test.patch
---
 zmq/tests/test_message.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/zmq/tests/test_message.py b/zmq/tests/test_message.py
index 063768c..1831e76 100644
--- a/zmq/tests/test_message.py
+++ b/zmq/tests/test_message.py
@@ -341,10 +341,8 @@ class TestFrame(BaseZMQTestCase):
         for i in range(1,len(shapes)+1):
             shape = shapes[:i]
             for dt in dtypes:
-                A = numpy.empty(shape, dtype=dt)
-                while numpy.isnan(A).any():
-                    # don't let nan sneak in
-                    A = numpy.ndarray(shape, dtype=dt)
+                A = numpy.random.uniform(-10000000,
+                                         1000000, size=shape).astype(dt)
                 a.send(A, copy=False)
                 msg = b.recv(copy=False)