external/python3/ubsan.patch.0 | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit 957040675cab8c800ffa6fd66ec9e338fc778627 Author: Stephan Bergmann <[email protected]> AuthorDate: Thu Dec 18 12:51:37 2025 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu Dec 18 15:45:42 2025 +0100 external/python3: Silence UBSan "applying zero offset to null pointer" > Objects/listobject.c:1328:37: runtime error: applying zero offset to null pointer > #0 0x55b0a0534264 in list_extend_set /workdir/UnpackedTarball/python3/Objects/listobject.c:1328:37 > #1 0x55b0a052a015 in _list_extend /workdir/UnpackedTarball/python3/Objects/listobject.c:1412:15 > #2 0x55b0a0529e7c in list_extend /workdir/UnpackedTarball/python3/Objects/listobject.c:1459:9 > #3 0x55b0a0529e4c in _PyList_Extend /workdir/UnpackedTarball/python3/Objects/listobject.c:1468:12 > #4 0x55b0a038fc84 in PySequence_List /workdir/UnpackedTarball/python3/Objects/abstract.c:2135:10 > #5 0x55b0a0c8b648 in compiler_class_body /workdir/UnpackedTarball/python3/Python/compile.c:2554:44 > #6 0x55b0a0c4f1e8 in compiler_class /workdir/UnpackedTarball/python3/Python/compile.c:2674:9 > #7 0x55b0a0c42d62 in compiler_visit_stmt /workdir/UnpackedTarball/python3/Python/compile.c:4053:16 > #8 0x55b0a0c3fde2 in compiler_body /workdir/UnpackedTarball/python3/Python/compile.c:1684:9 > #9 0x55b0a0c300c7 in compiler_codegen /workdir/UnpackedTarball/python3/Python/compile.c:1695:13 > #10 0x55b0a0c2b68d in compiler_mod /workdir/UnpackedTarball/python3/Python/compile.c:1736:9 > #11 0x55b0a0c2b460 in _PyAST_Compile /workdir/UnpackedTarball/python3/Python/compile.c:452:24 > #12 0x55b0a0f9145d in Py_CompileStringObject /workdir/UnpackedTarball/python3/Python/pythonrun.c:1563:10 > #13 0x55b0a0f914ee in Py_CompileStringExFlags /workdir/UnpackedTarball/python3/Python/pythonrun.c:1576:10 > #14 0x55b09fe074cc in compile_and_marshal /workdir/UnpackedTarball/python3/Programs/_freeze_module.c:117:22 > #15 0x55b09fe068ac in main /workdir/UnpackedTarball/python3/Programs/_freeze_module.c:230:28 > #16 0x7fa25722a60f in __libc_start_call_main (/lib64/libc.so.6+0x2a60f) (BuildId: e650335ac8463e9e58c04e07c6f36c5f826ed953) > #17 0x7fa25722a6bf in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x2a6bf) (BuildId: e650335ac8463e9e58c04e07c6f36c5f826ed953) > #18 0x55b09fcc70f4 in _start (/workdir/UnpackedTarball/python3/Programs/_freeze_module+0xb050f4) as seen while building ExternalProject_python3 at <https://ci.libreoffice.org/job/lo_ubsan/3755/>, presumably since 241826dcb9bfa624e0761e6489b249b6fb507ea9 "python3: upgrade to 3.13.11 (master only)" Change-Id: I981820da8cf7e99e04e01fce8add7574d6f20ab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195840 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0 index beed066c1b0b..d7807a6e7e5a 100644 --- a/external/python3/ubsan.patch.0 +++ b/external/python3/ubsan.patch.0 @@ -32,6 +32,15 @@ for (i = 0; i < Py_SIZE(b); i++) { PyObject *v = src[i]; dest[i] = Py_NewRef(v); +@@ -1325,7 +1325,7 @@ + Py_ssize_t setpos = 0; + Py_hash_t hash; + PyObject *key; +- PyObject **dest = self->ob_item + m; ++ PyObject **dest = m == 0 ? self->ob_item : self->ob_item + m; + while (_PySet_NextEntryRef((PyObject *)other, &setpos, &key, &hash)) { + FT_ATOMIC_STORE_PTR_RELEASE(*dest, key); + dest++; --- Parser/lexer/buffer.c +++ Parser/lexer/buffer.c @@ -27,8 +27,8 @@
