-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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_gdb fails in debug build with -mcet -fcf-protection -O0
#77143
Comments
test_gdb fails on Fedora 28. This happens only in debug build, and only if built with control flow protection flags: Reproduction steps on Fedora 28 (x86_64): ./configure --with-pydebug Actual result: Re-running test 'test_gdb' in verbose mode Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 617, in test_builtin_method
(gdb_repr, gdb_output))
AssertionError: None is not true : Unexpected gdb representation: '<unknown at remote 0x555555759c40>'
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<unknown at remote 0x555555759c40>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<unknown at remote 0x555555759c40>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 523, in test_builtins_help
msg='Unexpected rendering %r' % gdb_repr)
AssertionError: None is not true : Unexpected rendering '<unknown at remote 0x7fffffffc7a8>' ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 307, in test_bytes
self.assertGdbRepr(b'')
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: "<CodecInfo(name='utf-8', encode=<built-in[326 chars]3b8>" != "b''"
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ b''
: "<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>" did not equal expected "b''"; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 295, in test_dicts
self.assertGdbRepr({})
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: "<CodecInfo(name='utf-8', encode=<built-i[327 chars]3b8>" != '{}'
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ {}
: "<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>" did not equal expected '{}'; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 393, in test_exceptions
''')
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 241, in get_gdb_repr
import_site=import_site)
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[197 chars]e: "] != []
First list contains 2 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xb0 in position 0: invalid start byte: ',
- "Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xb0 in position 0: invalid start byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 627, in test_frames
cmds_after_breakpoint=['print (PyFrameObject*)(((PyCodeObject*)v)->co_zombieframe)']
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ['Cannot access memory at address 0x90'] != []
First list contains 1 additional elements.
First extra element 0:
'Cannot access memory at address 0x90'
- ['Cannot access memory at address 0x90']
+ [] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 379, in test_frozensets
self.assertGdbRepr(frozenset(), "frozenset()")
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: '()' != 'frozenset()'
- ()
+ frozenset()
: '()' did not equal expected 'frozenset()'; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 281, in test_int
self.assertGdbRepr(42)
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: "<CodecInfo(name='utf-8', encode=<built-i[327 chars]3b8>" != '42'
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ 42
: "<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>" did not equal expected '42'; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 302, in test_lists
self.assertGdbRepr([])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: "<CodecInfo(name='utf-8', encode=<built-i[327 chars]3b8>" != '[]'
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ []
: "<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>" did not equal expected '[]'; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 418, in test_modern_class
msg='Unexpected new-style class rendering %r' % gdb_repr)
AssertionError: None is not true : Unexpected new-style class rendering '<unknown at remote 0x7ffff7e47360>' ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 542, in test_selfreferential_dict
self.assertEqual(gdb_repr, "{'foo': {'bar': {...}}}")
AssertionError: "<CodecInfo(name='utf-8', encode=<built-in[326 chars]3b8>" != "{'foo': {'bar': {...}}}"
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ {'foo': {'bar': {...}}} ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 530, in test_selfreferential_list
self.assertEqual(gdb_repr, '[3, 4, 5, [...]]')
AssertionError: '<unknown at remote 0xf7e4a1a8>' != '[3, 4, 5, [...]]'
- <unknown at remote 0xf7e4a1a8>
+ [3, 4, 5, [...]] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 568, in test_selfreferential_new_style_instance
(gdb_repr, gdb_output))
AssertionError: None is not true : Unexpected gdb representation: '<unknown at remote 0x7ffff7e47360>'
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<unknown at remote 0x7ffff7e47360>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<unknown at remote 0x7ffff7e47360>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 555, in test_selfreferential_old_style_instance
(gdb_repr, gdb_output))
AssertionError: None is not true : Unexpected gdb representation: '<unknown at remote 0x7ffff7e47360>'
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<unknown at remote 0x7ffff7e47360>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<unknown at remote 0x7ffff7e47360>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 361, in test_sets
self.assertGdbRepr(set(), "set()")
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: '()' != 'set()'
- ()
+ set()
: '()' did not equal expected 'set()'; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 289, in test_singletons
self.assertGdbRepr(True)
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: "<CodecInfo(name='utf-8', encode=<built-i[327 chars]3b8>" != 'True'
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ True
: "<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>" did not equal expected 'True'; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 331, in test_strings
self.assertGdbRepr('')
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: "<CodecInfo(name='utf-8', encode=<built-in[326 chars]3b8>" != "''"
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ ''
: "<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>" did not equal expected "''"; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 432, in test_subclassing_list
msg='Unexpected new-style class rendering %r' % gdb_repr)
AssertionError: None is not true : Unexpected new-style class rendering '<unknown at remote 0x7ffff7e475b8>' ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 447, in test_subclassing_tuple
msg='Unexpected new-style class rendering %r' % gdb_repr)
AssertionError: None is not true : Unexpected new-style class rendering '<unknown at remote 0x7ffff7e47360>' ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 588, in test_truncation
"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, "
AssertionError: '<unknown at remote 0x7ffff7e395d0>' != '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12[993 chars]ted)'
Diff is 1079 characters long. Set self.maxDiff to None to see it. ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 353, in test_tuples
self.assertGdbRepr(tuple(), '()')
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr
% (gdb_repr, exp_repr, gdb_output)))
AssertionError: "<CodecInfo(name='utf-8', encode=<built-i[327 chars]3b8>" != '()'
- <CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>
+ ()
: "<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>" did not equal expected '()'; full output was:
Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120
1120 {
#0 builtin_id (self=, v=<CodecInfo(name='utf-8', encode=<built-in method utf_8_encode of module object at remote 0x7ffff7e87ad8>, decode=<function at remote 0x7ffff7e19560>, incrementalencoder=<type at remote 0x5555557b26e8>, incrementaldecoder=<type at remote 0x5555557b2ae8>, streamwriter=<type at remote 0x5555557b2ee8>, streamreader=<type at remote 0x5555557b32e8>) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 643, in test_basic_command
cmds_after_breakpoint=['py-list'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 658, in test_one_abs_arg
cmds_after_breakpoint=['py-list 9'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 669, in test_two_abs_args
cmds_after_breakpoint=['py-list 1,3'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 694, in test_down_at_bottom
cmds_after_breakpoint=['py-down'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 683, in test_pyup_command
cmds_after_breakpoint=['py-up', 'py-up'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 702, in test_up_at_top
cmds_after_breakpoint=['py-up'] * 5)
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 712, in test_up_then_down
cmds_after_breakpoint=['py-up', 'py-up', 'py-down'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 727, in test_bt
cmds_after_breakpoint=['py-bt'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 747, in test_bt_full
cmds_after_breakpoint=['py-bt-full'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 866, in test_wrapper_call
r"<method-wrapper u?'__init__' of MyList object at ")
AssertionError: Regex didn't match: "<method-wrapper u?'__init__' of MyList object at " not found in 'Breakpoint 1 (builtin_id) pending.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib64/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=, v=<unknown at remote 0xf7e4d238>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120\n1120\t{\nBreakpoint 2: file /builddir/build/BUILD/Python-3.6.4/Objects/descrobject.c, line 1166.\n\nBreakpoint 2, wrapper_call (wp=<unknown at remote 0x7ffff7e71798>, args=0x0, kwds=<unknown at remote 0x7ffff77e8081>) at /builddir/build/BUILD/Python-3.6.4/Objects/descrobject.c:1166\n1166\t{\nTraceback (most recent call first):\n <unknown at remote 0x7ffff7e71798>\n File "<string>", line 4, in __init__\n File "<string>", line 7, in <module>\n' ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 875, in test_basic_command
cmds_after_breakpoint=['py-up', 'py-print args'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 884, in test_print_after_up
cmds_after_breakpoint=['py-up', 'py-up', 'py-print c', 'py-print b', 'py-print a'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 900, in test_printing_builtin
cmds_after_breakpoint=['py-up', 'py-print len'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 892, in test_printing_global
cmds_after_breakpoint=['py-up', 'py-print __name__'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 909, in test_basic_command
cmds_after_breakpoint=['py-up', 'py-locals'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 918, in test_locals_after_up
cmds_after_breakpoint=['py-up', 'py-up', 'py-locals'])
File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ["Python Exception <class 'UnicodeDecodeEr[82 chars]e: "] != []
First list contains 1 additional elements.
First extra element 0:
"Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: "
+ []
- ["Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't decode "
- 'byte 0xf3 in position 0: invalid continuation byte: '] Ran 46 tests in 20.175s Expected result: no failures Original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1541967 |
Ping. Could someone take a look? There is a PR ready. |
Wouldn't be better to use the "surrogateescape" or the "backslashreplace" error handlers? |
Are you talking about my #7693 fix? If yes, the error comes from the string() method which comes from the gdb API. I don't see how to control how gdb decodes bytes. |
Reminder: test_gdb is skipped on Travis CI and AppVeyor. I tested my two changes manually. I will backport python-gdb.py enhancements to other branches once PR 6754 fix will be merged. |
Oh :-( The change caused two buildbot failures, so I wrote PR 7723 to revert it. x86 Gentoo Non-Debug with X 3.x: ====================================================================== Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 481, in test_NULL_ptr
'backtrace'])
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 239, in get_gdb_repr
import_site=import_site)
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 217, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ['No symbol "v" in current context.'] != [] First list contains 1 additional elements.
====================================================================== Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 517, in test_builtins_help
gdb_repr, gdb_output = self.get_gdb_repr('id(__builtins__.help)', import_site=True)
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 246, in get_gdb_repr
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
AssertionError: Unexpected gdb output: 'Breakpoint 1 at 0xf1670: file Python/bltinmodule.c, line 1204.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=, v=<_Helper at remote 0xb796c2ec>) at Python/bltinmodule.c:1204\n1204\t{\n__x86.get_pc_thunk.bx ()\n#0 __x86.get_pc_thunk.bx ()\n'
Breakpoint 1 at 0xf1670: file Python/bltinmodule.c, line 1204.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=<_Helper at remote 0xb796c2ec>) at Python/bltinmodule.c:1204 ====================================================================== Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 702, in test_up_at_top
'Unable to find an older python frame\n')
File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_gdb.py", line 252, in assertEndsWith
msg='%r did not end with %r' % (actual, exp_end))
AssertionError: False is not true : 'Breakpoint 1 at 0xf1670: file Python/bltinmodule.c, line 1204.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=, v=42) at Python/bltinmodule.c:1204\n1204\t{\n__x86.get_pc_thunk.bx ()\nUnable to locate python frame\nUnable to locate python frame\nUnable to locate python frame\nUnable to locate python frame\nUnable to locate python frame\n' did not end with 'Unable to find an older python frame\n' AMD64 Debian PGO 3.x: ====================================================================== Traceback (most recent call last):
File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 351, in test_tuples
self.assertGdbRepr(tuple(), '()')
File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 270, in assertGdbRepr
gdb_repr, gdb_output = self.get_gdb_repr('id(' + ascii(val) + ')')
File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 246, in get_gdb_repr
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
AssertionError: Unexpected gdb output: 'Breakpoint 1 at 0x16dc20: file Python/bltinmodule.c, line 1205.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=, v=()) at Python/bltinmodule.c:1205\n1205\t return PyLong_FromVoidPtr(v);\nPyLong_FromVoidPtr () at Objects/longobject.c:1021\n1021\t{\n#0 PyLong_FromVoidPtr () at Objects/longobject.c:1021\n'
Breakpoint 1 at 0x16dc20: file Python/bltinmodule.c, line 1205.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=()) at Python/bltinmodule.c:1205 |
It seems to only be related to this change: Since I also backported this change to 3.7 and 3.6, buildbot of 3.7 and 3.6 also failed: AMD64 Debian PGO 3.7 AMD64 Debian PGO 3.6 x86 Gentoo Non-Debug with X 3.7 |
The problem is with this function:
static PyObject *
builtin_id(PyModuleDef *self, PyObject *v)
/*[clinic end generated code: output=0aa640785f697f65 input=5a534136419631f4]*/
{
return PyLong_FromVoidPtr(v);
} It's a one-liner, so the compiler really likes to inline it. Without the inline optimization, the additional "next" command makes a jump into the function. But when the function is inlined and you set a breakpoint to it, the line is just seen as a function from the debugger, that means you already are inside and the "next" makes the debugger exit this line, and so the function. More graphical explanation: inline case: I propose two possible solutions:
Also, I have found out that when configured with --with-pydebug and --enable-optimizations, tests stop to fail. (the failing bots are configuring with --enable-optimizations only) |
I'd say there are use cases where gdb will be used with optimizations especially in downstream distribution. |
It's already done, no? But the title issue is "-mcet -fcf-protection |
Related issue: bpo-31237. |
Some of the simple tests are still run even with optimizations. |
Oh I see. But currently, many test_gdb tests pass even with optimization. I dislike reducing the test coverage when Python is compiled with optimizations, just to support -mcet -fcf-protection. Would it be possible to detect the special case "-mcet -fcf-protection" *and* optimizations, and only skip test_gdb in that case? |
More info about -fcf-protection=full -mcet: "Enable control flow protection on x86-64 using -fcf-protection=full -mcet." man gcc:
|
I tested the following configurations on my Fedora 28: ./configure --with-pydebug CFLAGS=-O0 -mcet -fcf-protection test_gdb now pass with all these configurations |
Ok, the issue should now be fixed. Thanks Iryna Shcherbina for your bug report, and thanks Marcel Plch for your initial fix! Marcel: my final fix is based on yours, I just made the "next" conditional. |
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: