quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Woodcraft (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MODPYTHON-234) SystemError: bad argument to internal function
Date Thu, 26 Jun 2008 12:19:45 GMT

    [ https://issues.apache.org/jira/browse/MODPYTHON-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608403#action_12608403

Matthew Woodcraft commented on MODPYTHON-234:

In req_read() (as of 3.3.1), the return value of the first call to ap_get_client_block() isn't
checked for errors.

If this call returns -1 and the following call to ap_get_client_block() returns
0, it seems to me that the result would be a call to _PyString_Resize with size -1, which
matches the SystemError above.

> SystemError: bad argument to internal function
> ----------------------------------------------
>                 Key: MODPYTHON-234
>                 URL: https://issues.apache.org/jira/browse/MODPYTHON-234
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.10, 3.3.1
>            Reporter: Graham Dumpleton
> As raised in thread:
>   http://www.modpython.org/pipermail/mod_python/2007-June/023795.html
> when req.read() is called, on rare occasions it can generate the error:
> 05 18:33:49 2007] [error] [client] SystemError: Objects/stringobject.c:3515:
bad argument to internal function,
> It is speculated that this is caused by an invalid value being supplied to _PyString_Resize()
with code associated with req.read(). In particular, most likely being supplied a negative
value for size.
> This issues possibly relates to problems with how mod_python makes use of content length
and what request_rec says in respect of remaining amount of data as described in MODPYTHON-212.
> Further highlights how the code for req.read(), req.readline() and req.readlines() has
to be completely revised and overhauled to simply read whatever is available rather than trusting
content length.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message