[New-bugs-announce] [issue23503] undefined behavior in Objects/obmalloc.c

Dwight Guth report at bugs.python.org
Mon Feb 23 22:18:56 CET 2015


New submission from Dwight Guth:

According to the ISO C standard (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf) section 6.5.6 paragraph 8, the behavior of the C addition operator is undefined if the result of the operand does not either fall inside the same array object that is being indexed, or one index past the end of the array object. In Objects/obmalloc.c line 841, the macros PT(0) through PT(7) expand to references to array indexes before the beginning of the usedpools array. As a result, this initializer causes this file to be undefined.

----------
components: Interpreter Core
messages: 236465
nosy: dwight.guth
priority: normal
severity: normal
status: open
title: undefined behavior in Objects/obmalloc.c
type: behavior

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


More information about the New-bugs-announce mailing list