Antoine Pitrou added the comment:

gdb backtrace:

#0  0x00007ffff711ff79 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff7123388 in __GI_abort () at abort.c:89
#2  0x00007ffff7118e36 in __assert_fail_base (fmt=0x7ffff726a718 "%s%s%s:%u: 
%s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x670d48 "(result != ((void *)0) && 
!PyErr_Occurred()) || (result == ((void *)0) && PyErr_Occurred())", 
file=file@entry=0x670332 "Objects/abstract.c", line=line@entry=2077, 
    function=function@entry=0x670ff6 <__PRETTY_FUNCTION__.10598> 
"PyObject_Call") at assert.c:92
#3  0x00007ffff7118ee2 in __GI___assert_fail (
    assertion=0x670d48 "(result != ((void *)0) && !PyErr_Occurred()) || (result 
== ((void *)0) && PyErr_Occurred())", 
    file=0x670332 "Objects/abstract.c", line=2077, function=0x670ff6 
<__PRETTY_FUNCTION__.10598> "PyObject_Call") at assert.c:101
#4  0x0000000000461e89 in PyObject_Call (func=0x7ffff27013d8, 
arg=0x7ffff6638ef8, kw=0x0) at Objects/abstract.c:2076
#5  0x0000000000462f62 in PyObject_CallFunctionObjArgs 
(callable=0x7ffff27013d8) at Objects/abstract.c:2362
#6  0x0000000000463c46 in PyObject_IsSubclass (derived=0x911140 
<_PyExc_OSError>, cls=0x911140 <_PyExc_OSError>)
    at Objects/abstract.c:2617
#7  0x00000000005cc591 in PyErr_NormalizeException (exc=0x7ffffffdc578, 
val=0x7ffffffdc580, tb=0x7ffffffdc588)
    at Python/errors.c:254
#8  0x0000000000639bc6 in buffered_close (self=0x7ffff7e6ad78, args=0x0) at 
./Modules/_io/bufferedio.c:552


It seems PyErr_NormalizeException doesn't like being called with an exception 
set.

----------

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

Reply via email to