python / python/cpython

test_buffer.test_array_alignment() fails on Python 3.15.0~a6 when using mimalloc

Đang mở
#144,725 18 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

3.15 3.16 tests type-bug
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

Bug report

Bug description:

When running the test suite for openSUSE/Linux on 32bit architectures (i586 and armv7l), I get this test failing

[ 3014s] ======================================================================
[ 3014s] FAIL: test_array_alignment (test.test_buffer.TestBufferProtocol.test_array_alignment)
[ 3014s] ----------------------------------------------------------------------
[ 3014s] Traceback (most recent call last):
[ 3014s]   File "/home/abuild/rpmbuild/BUILD/python315-nogil-3.15.0_a6-build/Python-3.15.0a6/Lib/test/test_buffer.py", line 4480, in test_array_alignment
[ 3014s]     self.assertEqual(
[ 3014s]     ~~~~~~~~~~~~~~~~^
[ 3014s]         [_testcapi.buffer_pointer_as_int(case) % align for case in cases],
[ 3014s]         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 3014s]         [0] * len(cases),
[ 3014s]         ^^^^^^^^^^^^^^^^^
[ 3014s]     )
[ 3014s]     ^
[ 3014s] AssertionError: Lists differ: [0, 4, 0, 0, 0, 0, 0, 0, 0, 0] != [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[ 3014s] 
[ 3014s] First differing element 1:
[ 3014s] 4
[ 3014s] 0
[ 3014s] 
[ 3014s] - [0, 4, 0, 0, 0, 0, 0, 0, 0, 0]
[ 3014s] ?     ---
[ 3014s] 
[ 3014s] + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[ 3014s] ?                          +++
[ 3014s] 
[ 3014s] 
[ 3014s] ----------------------------------------------------------------------
[ 3014s] Ran 97 tests in 11.932s
[ 3014s] 
[ 3014s] FAILED (failures=1, skipped=2)

Complete build log with all packages used and steps taken to reproduce.

It seems that _testcapi module has been correctly build.

CPython versions tested on:

3.15

Operating systems tested on:

Linux

Linked PRs
  • gh-145026
  • gh-157530

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Start with Lib/test/test_buffer.py at test_array_alignment around line 4480 and the _testcapi.buffer_pointer_as_int calls. Reproduce the failure on 32-bit Linux with mimalloc using the complete build log and compare the affected alignment case. Done means the test passes without weakening its alignment assertion; linked PRs gh-145026 and gh-157530 should be reviewed first.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
testing-qa
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.