[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: The crypt_r() interceptor issue was reported in January 2021 to libasan: https://github.com/google/sanitizers/issues/1365 > I enabled the test on ASAN on test_crypt and I confirm that I get a crash on > calling a NULL function. Note: I built Python with GCC

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: I enabled the test on ASAN on test_crypt and I confirm that I get a crash on calling a NULL function. The Python crypt.crypt() function calls the C function crypt_r() which is intercepted by libasan, but the libasan implementation calls a NULL function. I

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-10 Thread STINNER Victor
STINNER Victor added the comment: Current status of tests skipped on ASAN, MSAN and UBSAN. Only ASAN (1): * _test_multiprocessing.py:76:if support.check_sanitizer(address=True): ASAN and MSAN (10): * test___all__.py:14:if support.check_sanitizer(address=True, memory=True): *

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-07 Thread Martin Panter
Martin Panter added the comment: The ctypes overflow is probably the same as described in Issue 28169 and Issue 15119 -- nosy: +martin.panter ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-04 Thread STINNER Victor
STINNER Victor added the comment: > I don't agree with GH-31673. Did you try defining NO_MISALIGNED_ACCESSES > instead? Did you read the commit message? The change is not about skipping the test, but fixing the CI. Previously, test_hashlib was not run at all on the UBSan buildbot, now most

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread Christian Heimes
Christian Heimes added the comment: I don't agree with GH-31673. Did you try defining NO_MISALIGNED_ACCESSES instead? -- nosy: +christian.heimes ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6a14330318c9c7aedf3e9841c3dfea337064d8e6 by Victor Stinner in branch '3.9': bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675) (GH-31676)

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29796 pull_request: https://github.com/python/cpython/pull/31676 ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7b5b429adab4fe0fe81858fe3831f06adc2e2141 by Victor Stinner in branch '3.10': [3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675)

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: I pushed changes just to turn back the buildbot back to green, but undefined behaviors in test_ctypes.test_shorts() and _sha3 (tested by test_hashlib) must be fixed. Previously, test_ctypes, test_hashlib and test_faulthandler were fully skipped on UBSan.

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29795 pull_request: https://github.com/python/cpython/pull/31675 ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset ad1b04451d3aca2c6fa6dbe2891676a4e0baac49 by Victor Stinner in branch 'main': bpo-46913: Skip test_ctypes.test_shorts() on UBSan (GH-31674) https://github.com/python/cpython/commit/ad1b04451d3aca2c6fa6dbe2891676a4e0baac49 --

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6d0d7d2b8c1e04fd51c6cb29cc09a41b60b97b7b by Victor Stinner in branch 'main': bpo-46913: test_hashlib skips _sha3 tests on UBSan (GH-31673) https://github.com/python/cpython/commit/6d0d7d2b8c1e04fd51c6cb29cc09a41b60b97b7b --

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46887: ./Programs/_freeze_module fails with MSAN: Uninitialized value was created by an allocation of 'stat.i'. -- ___ Python tracker

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 65b92ccdec2ee4a99e54aaf7ae2d9bbc2ebfe549 by Victor Stinner in branch 'main': bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672) https://github.com/python/cpython/commit/65b92ccdec2ee4a99e54aaf7ae2d9bbc2ebfe549 --

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29794 pull_request: https://github.com/python/cpython/pull/31674 ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29793 pull_request: https://github.com/python/cpython/pull/31673 ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29792 pull_request: https://github.com/python/cpython/pull/31672 ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: > https://github.com/python/buildmaster-config/commit/0fd1e3e49e4b688d5767501484cccea5fa35d3fc Previously, 4 tests were skipped on the UBSAN buildbot * test_faulthandler * test_hashlib * test_concurrent_futures * test_ctypes It's not a regression, it's just

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: Reproducer of test_ctypes undefined behavior: --- from ctypes import * class BITS(Structure): _fields_ = [("A", c_int, 1), ("B", c_int, 2), ("C", c_int, 3), ("D", c_int, 4), ("E", c_int, 5),

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +29785 pull_request: https://github.com/python/cpython/pull/31666 ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +29784 pull_request: https://github.com/python/cpython/pull/31665 ___ Python tracker

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4173d677a1d7c72bb32d292fbff1b4cf073d615c by Victor Stinner in branch 'main': bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (GH-31662) https://github.com/python/cpython/commit/4173d677a1d7c72bb32d292fbff1b4cf073d615c --

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29781 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31662 ___ Python tracker ___

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: test_faulthandler: test_sigfpe() fails with: == FAIL: test_sigfpe (test.test_faulthandler.FaultHandlerTests) -- Traceback

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: test_hashlib: test_gil() fails with: --- test_gil (test.test_hashlib.HashLibTestCase) ... /home/vstinner/python/main/Modules/_sha3/kcp/KeccakP-1600-opt64.c:467:9: runtime error: load of misaligned address 0x02daafd7 for type 'UINT64' (aka 'unsigned

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
STINNER Victor added the comment: test_ctypes: test_shorts() of ctypes.test.test_bitfields.C_Test is failing with: --- test_shorts (ctypes.test.test_bitfields.C_Test) ... /home/vstinner/python/main/Modules/_ctypes/cfield.c:554:5: runtime error: shift exponent 18446744073709551614 is too

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor
New submission from STINNER Victor : I recently changed how tests are skipped in ASAN, MSAN and UBSAN CIs (buildbot workers and GitHub Action jobs): * bpo-46633 * https://github.com/python/buildmaster-config/commit/0fd1e3e49e4b688d5767501484cccea5fa35d3fc 3 tests are now failing on "AMD64