New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_ctypes failure on AIX in PyEval_CallObjectWithKeywords #62809
Comments
test_ctypes now crashes on AIX after the ceval change to PyEval_CallObjectWithKeywords to check PyErr_Occurred(). #5 0x100ff0c8 in PyEval_CallObjectWithKeywords (func=0x300a4c3c,
arg=0x3062bb24, kw=0x0) at Python/ceval.c:4066
#6 0x10166bfc in PyCodec_Decode (object=0x305d5834,
encoding=0x200a0b80 "iso8859-1",
errors=0x102dd0b4 <PyOS_mystricmp+13668> "surrogateescape")
at Python/codecs.c:403
#7 0x1006d500 in PyUnicode_Decode (
s=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c", size=19,
encoding=0x200a0b80 "iso8859-1",
errors=0x102dd0b4 <PyOS_mystricmp+13668> "surrogateescape")
at Objects/unicodeobject.c:3045
#8 0x1006f208 in PyUnicode_DecodeFSDefaultAndSize (
s=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c", size=19)
at Objects/unicodeobject.c:3640
#9 0x1006f150 in PyUnicode_DecodeFSDefault (
s=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c")
at Objects/unicodeobject.c:3618
#10 0x1017b870 in PyCode_NewEmpty (
filename=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356> "_ctypes/callbacks.c",
funcname=0xdb1c8218 <_GLOBAL__FD__ctypes_so+8328> "'calling
callback function'", firstlineno=260) at Objects/codeobject.c:174
#11 0xdb1c3960 in _ctypes_add_traceback (
funcname=0xdb1c8218 <_GLOBAL__FD__ctypes_so+8328> "'calling
callback function'", filename=0xdb1c8234 <_GLOBAL__FD__ctypes_so+8356>
"_ctypes/callbacks.c",
lineno=260) at /home/dje/src/cpython/Modules/_ctypes/callbacks.c:104
#12 0xdb1c4204 in _CallPythonObject (mem=0x2ff144d8, restype=0x303a1ddc,
setfunc=@0x20365824: 0xdb1bbfd4 <l_set>, callable=0x3055b454,
converters=0x30628e6c, flags=257, pArgs=0x2ff14444)
at /home/dje/src/cpython/Modules/_ctypes/callbacks.c:261
#13 0xdb1c4690 in closure_fcn (cif=0x30528de8, resp=0x2ff144d8,
args=0x2ff14440, userdata=0x30528dcc)
at /home/dje/src/cpython/Modules/_ctypes/callbacks.c:322
#14 0xdb1c2a90 in ffi_closure_helper_DARWIN (closure=0x20367008,
rvalue=0x2ff144d8, pgr=0x2ff14570, pfr=0x2ff144f0)
at /home/dje/src/cpython/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c:1355
#15 0xdb1c2c80 in ffi_closure_ASM ()
from /home/dje/src/cpython/build/lib.aix-7.1-3.4-pydebug/_ctypes.so
#16 0xdb1c2ba0 in ffi_call_AIX ()
from /home/dje/src/cpython/build/lib.aix-7.1-3.4-pydebug/_ctypes.so
#17 0xdb1c231c in ffi_call (cif=0x2ff146b8, fn=0x20367008, rvalue=0x2ff14770,
avalue=0x2ff14750)
at /home/dje/src/cpython/Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c:936
#18 0xdb1a3a68 in _call_function_pointer (flags=4353, pProc=0x20367008,
avalues=0x2ff14750, atypes=0x2ff14730, restype=0x303a1ddc,
resmem=0x2ff14770, argcount=1)
at /home/dje/src/cpython/Modules/_ctypes/callproc.c:811
#19 0xdb1a47c4 in _ctypes_callproc (pProc=0x20367008, argtuple=0x3062be6c,
flags=4353, argtypes=0x3062b99c, restype=0x304735a4, checker=0x0)
at /home/dje/src/cpython/Modules/_ctypes/callproc.c:1152
#20 0xdb19da70 in PyCFuncPtr_call (self=0x3061e9c4, inargs=0x3062be6c,
kwds=0x3062bd1c) at /home/dje/src/cpython/Modules/_ctypes/_ctypes.c:3820
#21 0x1010b85c in PyObject_Call (func=0x3061e9c4, arg=0x3062be6c,
kw=0x3062bd1c) at Objects/abstract.c:2105
#22 0x10101778 in ext_do_call (func=0x3061e9c4, pp_stack=0x2ff15154, flags=3,
na=0, nk=0) at Python/ceval.c:4537
#23 0x100f8464 in PyEval_EvalFrameEx (f=0x305e5bcc, throwflag=0)
at Python/ceval.c:2858
#24 0x100fca84 in PyEval_EvalCodeEx (_co=0x3055a980, globals=0x30554d1c,
locals=0x0, args=0x3062c300, argcount=3, kws=0x3062c30c, kwcount=0,
defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3567
#25 0x101004d4 in fast_function (func=0x3055b514, pp_stack=0x2ff15bb0, n=3,
na=3, nk=0) at Python/ceval.c:4320 |
New changeset de1ea7f84e08 by Victor Stinner in branch 'default': |
This issue is not a bug, but a new assertion added by myself for the issue bpo-18408. The idea is to not call a Python function with an exception set, because the exception may be cleared or replaced (ex: hasattr() clears the current exception if an attribute is not found). I didn't see this specific issue because AIX is using a special locale setting. Its locale encoding is an alias of the ISO-8859-1 which is not known by PyUnicode_Decode(). I'm waiting for the buildbot to see if my changeset fixed the issue. If it does, I will also add a fast-path for the "iso8859-1" alias of the ISO-8859-1 codec in PyUnicode_Decode(). So the AIX buildbot will also use the C implementation of the codec. |
Thanks. The patch seems to return the tests to the expected failures and Python does not crash. |
New changeset 31f9c1481cfa by Victor Stinner in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: