summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-02 17:50:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-02 17:50:17 +0200
commit1c989f8eff440fc47588b77cc73969a8c789a5ae (patch)
tree18c1a86932ce34b23d897789808fb4df8043e74f /external
parentc710b435f1443b5a5d8a0679943bc8a71755d866 (diff)
external/python3: -fsanitize=nonnull-attribute
Change-Id: Ib589b638a81bfb77fd74da8b15ae7b11cfd2b58b
Diffstat (limited to 'external')
-rw-r--r--external/python3/ubsan.patch.011
1 files changed, 11 insertions, 0 deletions
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 020f4bfc5440..32a079e04a01 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -20,6 +20,17 @@
/* Set the carry bit iff the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
+--- Objects/bytearrayobject.c
++++ Objects/bytearrayobject.c
+@@ -294,7 +294,7 @@
+ PyBuffer_Release(&vo);
+ return NULL;
+ }
+- memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
++ if (vo.len != 0) memcpy(self->ob_bytes + mysize, vo.buf, vo.len);
+ PyBuffer_Release(&vo);
+ Py_INCREF(self);
+ return (PyObject *)self;
--- Objects/listobject.c
+++ Objects/listobject.c
@@ -641,7 +641,7 @@