> Objects/listobject.c:1370:37: runtime error: applying zero offset to null pointer
> #0 0x7f38b863523a in list_extend_dictitems /workdir/UnpackedTarball/python3/Objects/listobject.c:1370:37
> #1 0x7f38b862a555 in _list_extend /workdir/UnpackedTarball/python3/Objects/listobject.c:1435:15
> #2 0x7f38b8651977 in list___init___impl /workdir/UnpackedTarball/python3/Objects/listobject.c:3467:13
> #3 0x7f38b86305d3 in list_vectorcall /workdir/UnpackedTarball/python3/Objects/listobject.c:3491:13
[...]
as seen while building workdir/XcuFilterFiltersTarget/fcfg_impress_filters.xcu
etc. at <https://ci.libreoffice.org/job/lo_ubsan/3756/>.
(Same as 314c4b5ef949f5bb1a4f13048726c440e556ba67 "external/python3: Silence
UBSan 'applying zero offset to null pointer'", this only gets reported with old
Clang prior to Clang 20
<https://github.com/llvm/llvm-project/commit/4847395c5459f9c476808f9337abdae7fbd78a23>
"[Clang] Adjust pointer-overflow sanitizer for N3322 (#120719)".)
Change-Id: I15129f5fa3eb3c0f92d6e3a80f914f63e12efdb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195894
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
...that 241826dcb9 "python3: upgrade to 3.13.11
(master only)" had simply dropped, but which is still necessary to silence
pointer-overflow issues as discussed in the commit message of
fcaef01faf "external/python3: Silence
pointer-overflow" (now, it caused e.g.
> [FIO] fcfg_database_others.xcu
> Parser/lexer/buffer.c:30:41: runtime error: pointer index expression with base 0x7d8e21edb920 overflowed to 0xfffffffffffe2000
> #0 in _PyLexer_restore_fstring_buffers at workdir/UnpackedTarball/python3/Parser/lexer/buffer.c:30:41
> #1 in _PyLexer_tok_reserve_buf at workdir/UnpackedTarball/python3/Parser/lexer/buffer.c:73:9
> #2 in tok_readline_raw at workdir/UnpackedTarball/python3/Parser/tokenizer/file_tokenizer.c:59:14
[...]
to fail during the build)
Change-Id: Ib91feb446f6dfcbe3e60b8e3b54ac6503546ddda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195773
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
...when generating Python/deepfreeze/deepfreeze.c during the build of
ExternalProject_python3 after 50524481b3 "Python:
upgrade to 3.11.11 (master only)",
> Objects/dictobject.c:1500:40: runtime error: load of misaligned address 0x555853494d81 for type 'PyDictUnicodeEntry *', which requires 8 byte alignment
> 0x555853494d81: note: pointer points here
> 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ^
> #0 in dictresize at workdir/UnpackedTarball/python3/Objects/dictobject.c:1500:21
> #1 in dict_merge at workdir/UnpackedTarball/python3/Objects/dictobject.c:2880:17
> #2 in _PyDict_MergeEx at workdir/UnpackedTarball/python3/Objects/dictobject.c:3003:12
> #3 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:3432:17
> #4 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16
> #5 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24
> #6 in _PyFunction_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:393:16
> #7 in _PyObject_FastCallDictTstate at workdir/UnpackedTarball/python3/Objects/call.c:141:15
> #8 in _PyObject_Call_Prepend at workdir/UnpackedTarball/python3/Objects/call.c:482:24
> #9 in slot_tp_init at workdir/UnpackedTarball/python3/Objects/typeobject.c:7855:15
> #10 in type_call at workdir/UnpackedTarball/python3/Objects/typeobject.c:1103:19
> #11 in _PyObject_MakeTpCall at workdir/UnpackedTarball/python3/Objects/call.c:214:18
> #12 in _PyObject_VectorcallTstate at workdir/UnpackedTarball/python3/./Include/internal/pycore_call.h:90:16
> #13 in PyObject_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:299:12
> #14 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:4769:23
> #15 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16
> #16 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24
> #17 in PyEval_EvalCode at workdir/UnpackedTarball/python3/Python/ceval.c:1148:21
> #18 in run_eval_code_obj at workdir/UnpackedTarball/python3/Python/pythonrun.c:1741:9
> #19 in run_mod at workdir/UnpackedTarball/python3/Python/pythonrun.c:1762:19
> #20 in pyrun_file at workdir/UnpackedTarball/python3/Python/pythonrun.c:1657:15
> #21 in _PyRun_SimpleFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:440:13
> #22 in _PyRun_AnyFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:79:15
> #23 in pymain_run_file_obj at workdir/UnpackedTarball/python3/Modules/main.c:360:15
> #24 in pymain_run_file at workdir/UnpackedTarball/python3/Modules/main.c:379:15
> #25 in pymain_run_python at workdir/UnpackedTarball/python3/Modules/main.c:605:21
> #26 in Py_RunMain at workdir/UnpackedTarball/python3/Modules/main.c:684:5
> #27 in main at workdir/UnpackedTarball/python3/Programs/_bootstrap_python.c:109:12
Change-Id: I0bacef11b5874bca6104516a206076a0505528ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180037
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
...that happen when building ExternalProject_python3 itself after
12142490cd "Enable Python Py_DEBUG setting when
built with --enable-dbgutil on Linux":
For one, silence
> Modules/posixmodule.c:14395:9: runtime error: left shift of 34 by 26 places cannot be represented in type 'int'
> #0 in all_ins at workdir/UnpackedTarball/python3/./Modules/posixmodule.c:14395:9
where at least my kernel-headers-5.9.9-200.fc33.x86_64
/usr/include/linux/memfd.h has
> #define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB
and /usr/include/asm-generic/hugetlb_encode.h has
> #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT)
For another (and as predicted in 29d47d22c4 "Fix
passing --disable-optimized into external/python3": "in a Linux UBsan build,
making ExternalProject_python3 would have started to cause some 'applying zero
offset to null pointer' failures, but which would have been easy to fix"),
silence
> Objects/listobject.c:551:24: runtime error: applying zero offset to null pointer
> #0 in list_concat at workdir/UnpackedTarball/python3/Objects/listobject.c:551:24
Change-Id: I0523cd35e393000c8e67629a0522b2db1d8c16f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106984
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* external/python3/python-3.3.3-aix.patch.1:
most of it doesn't apply and AIX port isn't maintained anyway so
remove it for now
* external/python3/ubsan.patch.0:
apparently one of the files was removed
* 0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1:
fixed upstream
* python3-osx-avoid-new-10.13.patch.1:
replace with simply passing ac_cv_func_utimensat=no to configure
* external/python3/python-3.5.4-ssl.patch.1:
project files to build OpenSSL removed upstream
* There have been changes to how python locates OpenSSL; new variables
OPENSSL_INCLUDES etc; it turns out that you have to pass one directory
to --with-openssl, as the variables cannot be passed
* libuuid.so.1 is a new dependency of the _uuid module
* libffi.so.6 is a new dependency of the _ctypes module (the bundled
copy of libffi for non-Darwin platforms was removed)
* python-3.3.0-pythreadstate.patch.1:
the PyThreadState functions have been changed such that
CppunitTest_services asserts when there is a PyThreadAttach on top of
PyThreadDetach on top of PyThreadAttach, i.e., 2 PyThreadState per
thread (PyGILState_Check() fails). Instead of patching in additional
workarounds, change PyThreadAttach so that it re-uses an existing
PyThreadState if one exists for the thread.
Change-Id: I24c19d79b43a30709261fd9db66312b2e3872fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84765
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
- fixes some minor CVEs
- drop python-vc2013.patch.1
- drop python-3.3.3-py17797.patch.1:
the bug was fixed in MSVC2015 runtime so not relevant
- drop python-lsan.patch.0:
fixed upstream
- ubsan.patch.0:
drop hunks that were fixed upstream
- python-3.5.0-tcltk.disable.patch:
merge into msvc-disable.patch.1
Change-Id: I2aecae446539d28eaf3eb64ee67581596019335d
Reviewed-on: https://gerrit.libreoffice.org/33225
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
The original patch caused compilation of x86-ffi64.c to fail, but that
failure was silently ignored by the build.
Change-Id: I93a0cde041b8f9546873d6cc30c1b690da098642
3.5 release is needed for MSVC 14.0 (aka VS 2015) support. Python 3.5
removed build toolchain support for MSVC 2013. Because we still need
to support it, we duplicate the Python directory in externals and
copy old patches and dispatch to this directory for MSVC 2013. Once
the support for MSVC 2013 is dropped on master, this directory can be
removed again.
Change-Id: Idf7bc351239582f583ecbdb53c923cbdcf968089
Reviewed-on: https://gerrit.libreoffice.org/17352
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>