diff options
Diffstat (limited to 'external/python3')
-rw-r--r-- | external/python3/ubsan.patch.0 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0 index 938acc1f1725..9f458b1e0f95 100644 --- a/external/python3/ubsan.patch.0 +++ b/external/python3/ubsan.patch.0 @@ -18,3 +18,26 @@ /* Set the carry bit if the function uses any sse registers. This is clc or stc, together with the first byte of the jmp. */ +--- Modules/posixmodule.c ++++ Modules/posixmodule.c +@@ -23,6 +23,9 @@ + }; + + static int ++#if defined __clang__ ++__attribute__((no_sanitize("shift-base"))) // MFD_HUGE_16GB in /usr/include/linux/memfd.h ++#endif + all_ins(PyObject *m) + { + #ifdef F_OK +--- Objects/listobject.c ++++ Objects/listobject.c +@@ -548,7 +548,7 @@ + dest[i] = v; + } + src = b->ob_item; +- dest = np->ob_item + Py_SIZE(a); ++ dest = Py_SIZE(a) == 0 ? np->ob_item : np->ob_item + Py_SIZE(a); + for (i = 0; i < Py_SIZE(b); i++) { + PyObject *v = src[i]; + Py_INCREF(v); |