[issue16216] Arithmetic operations with NULL

2013-01-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, I forgot to mention the issue number in commit messages. There are 
changeset ad9b5c69b8b6 (for 3.3) and changeset 1f66fc397c8d (for default).

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue16216] Arithmetic operations with NULL

2012-12-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka

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



[issue16216] Arithmetic operations with NULL

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16216] Arithmetic operations with NULL

2012-10-25 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
type:  - behavior

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



[issue16216] Arithmetic operations with NULL

2012-10-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage:  - patch review

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



[issue16216] Arithmetic operations with NULL

2012-10-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The Standard is not guarantee that result of converting null pointer to integer 
is zero or even it is a even number. I remember the ancient C implementation, 
where it was not so (but Python is not supports these platform).

Of course, such a method of obtaining aligned pointers is one great trick. I'm 
not sure whether to worry about that.

--
nosy: +mark.dickinson

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



[issue16216] Arithmetic operations with NULL

2012-10-12 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

In the function STRINGLIB(fastsearch_memchr_1char) in the file 
Objects/stringlib/fastsearch.h NULL returned by memchr/memrchr casted to 
intptr_t, then some arithmetic operations performed on this integer, and result 
casted back to pointer. I think it is unsafe to do with NULL. The code is easy 
to rewrite in order to avoid such a questionable operations.

--
components: Interpreter Core
files: null_align.patch
keywords: 3.3regression, patch
messages: 172791
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Arithmetic operations with NULL
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27548/null_align.patch

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



[issue16216] Arithmetic operations with NULL

2012-10-12 Thread STINNER Victor

STINNER Victor added the comment:

 I think it is unsafe to do with NULL.

Could you please elaborate?

--
nosy: +haypo

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