diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-11 23:34:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-12-16 07:46:40 +0100 |
commit | 6928b045f09b5d983083607d63fcb2a547446d0a (patch) | |
tree | cc865a38ad41701cbfd50c37d41e7a5610454e61 /external/python3 | |
parent | 9cf20b5f0473db0b4dd2dcf607b7884f40762995 (diff) |
Clean up patch
Change-Id: I2aa51435d0a15e507d0bf95f98d69fa4cde00b05
Diffstat (limited to 'external/python3')
-rw-r--r-- | external/python3/ubsan.patch.0 | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0 index 700f43b9b2f8..639e85f5a23b 100644 --- a/external/python3/ubsan.patch.0 +++ b/external/python3/ubsan.patch.0 @@ -1,6 +1,20 @@ -diff -ru python3.orig/Modules/_ctypes/libffi/src/x86/ffi64.c python3/Modules/_ctypes/libffi/src/x86/ffi64.c ---- Modules/_ctypes/libffi/src/x86/ffi64.c 2015-07-05 18:50:07.000000000 +0200 -+++ Modules/_ctypes/libffi/src/x86/ffi64.c 2015-07-26 20:18:56.457153323 +0200 +--- Modules/_ctypes/_ctypes.c ++++ Modules/_ctypes/_ctypes.c +@@ -1358,8 +1358,10 @@ + goto error; + } + stgdict->shape[0] = length; +- memmove(&stgdict->shape[1], itemdict->shape, +- sizeof(Py_ssize_t) * (stgdict->ndim - 1)); ++ if (itemdict->shape) { ++ memmove(&stgdict->shape[1], itemdict->shape, ++ sizeof(Py_ssize_t) * (stgdict->ndim - 1)); ++ } + + itemsize = itemdict->size; + if (length * itemsize < 0) { +--- Modules/_ctypes/libffi/src/x86/ffi64.c ++++ Modules/_ctypes/libffi/src/x86/ffi64.c @@ -548,11 +548,15 @@ tramp = (volatile unsigned short *) &closure->tramp[0]; @@ -21,9 +35,8 @@ diff -ru python3.orig/Modules/_ctypes/libffi/src/x86/ffi64.c python3/Modules/_ct /* Set the carry bit iff the function uses any sse registers. This is clc or stc, together with the first byte of the jmp. */ -diff -ru python3.orig/Objects/listobject.c python3/Objects/listobject.c ---- Objects/listobject.c 2015-07-05 18:50:08.000000000 +0200 -+++ Objects/listobject.c 2015-07-26 20:22:30.539167695 +0200 +--- Objects/listobject.c ++++ Objects/listobject.c @@ -641,7 +641,7 @@ goto Error; } @@ -33,18 +46,3 @@ diff -ru python3.orig/Objects/listobject.c python3/Objects/listobject.c if (d < 0) { /* Delete -d items */ Py_ssize_t tail; ---- Modules/_ctypes/_ctypes.c -+++ Modules/_ctypes/_ctypes.c -@@ -1358,8 +1358,10 @@ - goto error; - } - stgdict->shape[0] = length; -- memmove(&stgdict->shape[1], itemdict->shape, -- sizeof(Py_ssize_t) * (stgdict->ndim - 1)); -+ if (itemdict->shape) { -+ memmove(&stgdict->shape[1], itemdict->shape, -+ sizeof(Py_ssize_t) * (stgdict->ndim - 1)); -+ } - - itemsize = itemdict->size; - if (length * itemsize < 0) { |