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

Having the ob_bytes field be NULL for a bytearray seems like a strange 
choice;  does anyone know why bytearray was designed this way?  Is it 
mainly for ease of combination with the stringlib library?

There does seem to be an awful lot of code that acts as though it 
expects x->ob_bytes to always be non-NULL for a valid PyByteArrayObject* 
x.  IMO, the use of pointer arithmetic with NULL pointers that Stefan 
pointed out should definitely be fixed.

The long_new problem looks like a trivial fix:  I'd fix it already, but 
given the number of other problems with this macro I'm not sure whether 
it should be fixed in Objects/longobject.c, or in the 
PyByteArray_AS_STRING macro itself.

I guess this is up to Georg and Benjamin, but I don't think 3.2 or 3.1.2 
should go out of the door with this bug present.

----------
priority: critical -> release blocker

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7561>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to