[issue9190] Undefined behaviour in _PyFloat_Pack4

2010-08-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Closing this as not worth worrying about.  This *is* undefined behaviour, but 
it really doesn't seem to be a problem in practice.  (It might have been better 
for the C standard to describe this as merely implementation-defined.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9190
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9190] Undefined behaviour in _PyFloat_Pack4

2010-08-04 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9190
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9190] Undefined behaviour in _PyFloat_Pack4

2010-07-07 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

_PyFloat_Pack4 does a double-to-float cast, without first checking that the 
value being converted is within the range of a float.  According to C99 
6.3.1.5p2, this results in undefined behaviour.  It should be fixed (probably 
via comparison with FLT_MAX before casting.)

np_float in the struct module also has this problem.

--
assignee: mark.dickinson
messages: 109483
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: Undefined behaviour in _PyFloat_Pack4
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9190
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com