diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 09:56:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 10:05:48 +0100 |
commit | 02effc8ef62ba30fc6bd8a57281105e3aecc29ce (patch) | |
tree | 9f434e5b605f5e25c4acbccf7d966b7891f775dd /external/python3 | |
parent | daa6fe4173ba9215a7044887dc28cc8ee4408985 (diff) |
ubsan failure on bootstrapping crashtesting
Change-Id: Ie2b338bdd75f26953c758b64711e60b6f5ce9c83
Diffstat (limited to 'external/python3')
-rw-r--r-- | external/python3/ubsan.patch.0 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0 index 32a079e04a01..e3798174baa0 100644 --- a/external/python3/ubsan.patch.0 +++ b/external/python3/ubsan.patch.0 @@ -62,3 +62,18 @@ Py_INCREF(v); #ifdef COUNT_ALLOCS if (ival >= 0) +--- Modules/_ctypes/_ctypes.c ++++ Modules/_ctypes/_ctypes.c +@@ -1328,8 +1328,10 @@ + if (stgdict->shape == NULL) + 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) { |