test_ffi_new_allocator_1 fails on aarch64 and x86_64 darwin
Hi,
we're seeing a test suite failure on both aarch64-darwin and x86_64-darwin in the following environment:
Python 3.10.9 cffi 1.15.1
This happens on our package builders (nixpkgs), which are generally busy hosts, so maybe it is just racy, because I cannot reproduce this on an otherwise idle machine.
=================================== FAILURES ===================================
___________________________ test_ffi_new_allocator_1 ___________________________
def test_ffi_new_allocator_1():
ffi = _cffi1_backend.FFI()
alloc1 = ffi.new_allocator()
alloc2 = ffi.new_allocator(should_clear_after_alloc=False)
for retry in range(100):
p1 = alloc1("int[10]")
p2 = alloc2("int[10]")
combination = 0
for i in range(10):
assert p1[i] == 0
combination |= p2[i]
p1[i] = -42
p2[i] = -43
if combination != 0:
break
del p1, p2
import gc; gc.collect()
else:
> raise AssertionError("cannot seem to get an int[10] not "
"completely cleared")
E AssertionError: cannot seem to get an int[10] not completely cleared
testing/cffi1/test_ffi_obj.py:359: AssertionError