[New-bugs-announce] [issue27570] Avoid memcpy(. . ., NULL, 0) etc calls

Martin Panter report at bugs.python.org
Mon Jul 18 22:57:10 EDT 2016


New submission from Martin Panter:

This patch fixes errors reported by GCC’s undefined behaviour sanitizer about calling functions with a null pointer:

./configure CC="gcc -fsanitize=undefined"

Using Issue 22605 as a precedent, I propose to avoid calling memcpy() and memmove() for zero-length copies when there may be a null pointer.

----------
components: Interpreter Core, ctypes
files: memcpy-null.patch
keywords: patch
messages: 270806
nosy: martin.panter
priority: normal
severity: normal
stage: patch review
status: open
title: Avoid memcpy(. . ., NULL, 0) etc calls
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43784/memcpy-null.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27570>
_______________________________________


More information about the New-bugs-announce mailing list