File: noncopysend-test.patch

package info (click to toggle)
pyzmq 27.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,984 kB
  • sloc: python: 15,189; ansic: 285; makefile: 169; sh: 85
file content (25 lines) | stat: -rw-r--r-- 880 bytes parent folder | 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
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
---
 tests/test_message.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/test_message.py b/tests/test_message.py
index e9e46b6..631bd78 100644
--- a/tests/test_message.py
+++ b/tests/test_message.py
@@ -360,7 +360,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)
+                A = numpy.random.uniform(-1000000,
+                                         1000000, size=shape).astype(dt)
                 a.send(A, copy=False)
                 msg = b.recv(copy=False)