| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I cannot reproduce test_capi or test_faulthandler failure locally. I built Python with ./configure --with-pydebug --with-undefined-behavior-sanitizer CC=clang LD=clang: $ UBSAN_OPTIONS='halt_on_error=1' ./python -m test -j0 test_capi test_faulthandler ... 0:00:16 load avg: 0.69 mem: 61.4 MiB [1/2] test_faulthandler passed 0:00:23 load avg: 0.90 mem: 34.7 MiB [2/2] test_capi passed ... All 2 tests OK. ... |
Sorry, something went wrong.
|
Ah, the "Sanitizers / UBSan" CI failed:
|
Sorry, something went wrong.
|
I rebuilt Python with CC=clang ./configure --config-cache --with-undefined-behavior-sanitizer --with-strict-overflow --with-pydebug && make clean && make. Aha. This time I'm able to reproduce the error: $ UBSAN_OPTIONS="halt_on_error=1" ./python -m test -v test_capi -m test_fromwidechar test_fromwidechar (test.test_capi.test_unicode.CAPITest.test_fromwidechar) Test PyUnicode_FromWideChar() ... Objects/unicodeobject.c:1942:38: runtime error: addition of unsigned offset to 0x0000017b51d8 overflowed to 0x0000017b51d4 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/unicodeobject.c:1942:38 |
Sorry, something went wrong.
|
test_capi pass with this change: diff --git a/Lib/test/test_capi/test_unicode.py b/Lib/test/test_capi/test_unicode.py
index 5dee25756fe..16ee04ba22b 100644
--- a/Lib/test/test_capi/test_unicode.py
+++ b/Lib/test/test_capi/test_unicode.py
@@ -842,9 +842,9 @@ def test_fromwidechar(self):
if SIZEOF_WCHAR_T == 2:
self.assertEqual(fromwidechar('a\U0001f600'.encode(encoding), 2), 'a\ud83d')
- self.assertRaises(MemoryError, fromwidechar, b'', PY_SSIZE_T_MAX)
+ #self.assertRaises(MemoryError, fromwidechar, b'', PY_SSIZE_T_MAX)
self.assertRaises(SystemError, fromwidechar, b'\0'*SIZEOF_WCHAR_T, -2)
- self.assertRaises(SystemError, fromwidechar, b'\0'*SIZEOF_WCHAR_T, PY_SSIZE_T_MIN)
+ #self.assertRaises(SystemError, fromwidechar, b'\0'*SIZEOF_WCHAR_T, PY_SSIZE_T_MIN)
self.assertEqual(fromwidechar(NULL, 0), '')
self.assertRaises(SystemError, fromwidechar, NULL, 1)
self.assertRaises(SystemError, fromwidechar, NULL, PY_SSIZE_T_MAX) |
Sorry, something went wrong.
|
I created #151278 to fix test_faulthandler. Once test_faulthandler will be fixed, I will create an issue to fix test_capi. I close this PR since it's wrong. We cannot just reenable the tests since they fail. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.