[New-bugs-announce] [issue40120] Undefined C behavior going beyond end of struct via a char[1].

Gregory P. Smith report at bugs.python.org
Mon Mar 30 17:04:23 EDT 2020


New submission from Gregory P. Smith <greg at krypto.org>:

The correct C99 way to do this is using a char[].  PyBytesObject and unicode's struct encoding_map both do this.

Unclear to me if we should backport this to earlier versions or not (because PyBytesObject may be exposed?)  Probably, but I also doubt it is a big deal as compilers are generally not _yet_ making use of this detail AFAIK.

----------
assignee: gregory.p.smith
components: Interpreter Core
messages: 365349
nosy: gregory.p.smith
priority: normal
severity: normal
stage: patch review
status: open
title: Undefined C behavior going beyond end of struct via a char[1].
type: compile error
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40120>
_______________________________________


More information about the New-bugs-announce mailing list