[Python-bugs-list] [Bug #114754] marshal_loads can return NULL without setting Error

noreply@sourceforge.net noreply@sourceforge.net
Mon, 18 Sep 2000 15:57:59 -0700


Bug #114754, was updated on 2000-Sep-18 15:46
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: marshal_loads can return NULL without setting Error

Details: I'm getting a NULL result from marshal_loads without it
setting an error. (This is in 1.5.2 and 2.0b1.)  I'm pretty 
sure the input being fed to marshal.loads is bad, but it 
still should still doing the error handling dance correctly, 
yes?  Here's a simple example:

    >>> import marshal
    >>> x = marshal.loads('006@mediaone.net.weekly.529454')
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    SystemError: NULL result without error in call_object

It looks like r_object returns NULL if type == '0' and then 
marshal_loads simply returns it without checking the value 
returned by r_object.  If this is a "feature" and not a
bug, there should at least be a comment in the TYPE_NULL
branch of the switch statement indicating why it's not an
error to return NULL without setting an exception.

(P.S.  Is there any search facility within the SF bug manager or are you stuck having to wade through all bugs to
find out if yours has already been reported?)


For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=114754&group_id=5470