[issue18519] test_sqlite crashes on OS X tiger 3.x buildbot

STINNER Victor report at bugs.python.org
Mon Jul 22 08:24:03 CEST 2013


STINNER Victor added the comment:

> Raised by what?

The test raising the assertion error is a Python authorizer callback which returns a Python int (2**32) larger than a C int (> INT_MAX) and so an OverflowError is raised in the C authorizer callback.

> Are you sure you don't just need to clear the exception
> if the callback function raises one?

I read the code one more time, and I saw this:

            if (_enable_callback_tracebacks) {
                PyErr_Print();
            } else {
                PyErr_Clear();
            }

So it is expected that the C authorizer callback clears the error.

Here is a new patch which implement the same behaviour on _PyLong_AsInt() failure.

----------
keywords: +patch
resolution: fixed -> 
status: closed -> open
Added file: http://bugs.python.org/file31002/sqlite_authorizer_err.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18519>
_______________________________________


More information about the Python-bugs-list mailing list