This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anthony Sottile
Recipients Anthony Sottile
Date 2020-01-05.01:14:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578186883.98.0.791148821148.issue39215@roundup.psfhosted.org>
In-reply-to
Content
this triggers an assertion when run with debug enabled:

$ gdb ./python 
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./python...done.
warning: File "/home/asottile/workspace/cpython/python-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /home/asottile/workspace/cpython/python-gdb.py
line to your configuration file "/home/asottile/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/asottile/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
(gdb) run t2.py
Starting program: /home/asottile/workspace/cpython/python t2.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
python: Python/compile.c:3545: compiler_nameop: Assertion `scope || PyUnicode_READ_CHAR(name, 0) == '_'' failed.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff7060801 in __GI_abort () at abort.c:79
#2  0x00007ffff705039a in __assert_fail_base (
    fmt=0x7ffff71d77d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x555555815190 "scope || PyUnicode_READ_CHAR(name, 0) == '_'", file=file@entry=0x555555814233 "Python/compile.c", 
    line=line@entry=3545, 
    function=function@entry=0x555555814180 <__PRETTY_FUNCTION__.17589> "compiler_nameop") at assert.c:92
#3  0x00007ffff7050412 in __GI___assert_fail (
    assertion=assertion@entry=0x555555815190 "scope || PyUnicode_READ_CHAR(name, 0) == '_'", file=file@entry=0x555555814233 "Python/compile.c", 
    line=line@entry=3545, 
    function=function@entry=0x555555814180 <__PRETTY_FUNCTION__.17589> "compiler_nameop") at assert.c:101
#4  0x000055555568e946 in compiler_nameop (c=0x7fffffffdb40, 
    name=<optimized out>, ctx=Load) at Python/compile.c:3545
#5  0x000055555569020e in compiler_visit_expr1 (c=c@entry=0x7fffffffdb40, 
    e=0x555555b739d0) at Python/compile.c:5027
#6  0x000055555569027f in compiler_visit_expr (c=0x7fffffffdb40, 
    e=<optimized out>) at Python/compile.c:5052
#7  0x0000555555693570 in compiler_visit_argannotation (
    c=c@entry=0x7fffffffdb40, id=0x7ffff7f95d60, annotation=<optimized out>, 
    names=names@entry=0x7ffff66217d0) at Python/compile.c:2045
#8  0x000055555569363e in compiler_visit_argannotations (
    c=c@entry=0x7fffffffdb40, args=0x555555b739c0, 
    names=names@entry=0x7ffff66217d0) at Python/compile.c:2066
#9  0x00005555556936b2 in compiler_visit_annotations (
    c=c@entry=0x7fffffffdb40, args=args@entry=0x555555b73a28, 
    returns=returns@entry=0x0) at Python/compile.c:2094
#10 0x00005555556939fc in compiler_function (c=0x7fffffffdb40, 
    s=0x555555b73ab8, is_async=is_async@entry=0) at Python/compile.c:2214
#11 0x0000555555693dad in compiler_visit_stmt (c=c@entry=0x7fffffffdb40, 
    s=0x555555b73ab8) at Python/compile.c:3332
---Type <return> to continue, or q <return> to quit---
#12 0x0000555555693b8f in compiler_function (c=0x7fffffffdb40, 
    s=<optimized out>, is_async=is_async@entry=0) at Python/compile.c:2238
#13 0x0000555555693dad in compiler_visit_stmt (c=c@entry=0x7fffffffdb40, 
    s=0x555555b73b00) at Python/compile.c:3332
#14 0x0000555555694022 in compiler_body (c=c@entry=0x7fffffffdb40, 
    stmts=0x555555b73960) at Python/compile.c:1816
#15 0x0000555555694754 in compiler_mod (c=c@entry=0x7fffffffdb40, 
    mod=mod@entry=0x555555b73c00) at Python/compile.c:1836
#16 0x000055555569682b in PyAST_CompileObject (mod=mod@entry=0x555555b73c00, 
    filename=filename@entry=0x7ffff662a7b0, flags=flags@entry=0x7fffffffddc0, 
    optimize=optimize@entry=-1, arena=arena@entry=0x7ffff7e69640)
    at Python/compile.c:364
#17 0x00005555556c20cc in run_mod (mod=mod@entry=0x555555b73c00, 
    filename=filename@entry=0x7ffff662a7b0, 
    globals=globals@entry=0x7ffff7ecf3b0, locals=locals@entry=0x7ffff7ecf3b0, 
    flags=flags@entry=0x7fffffffddc0, arena=arena@entry=0x7ffff7e69640)
    at Python/pythonrun.c:1138
#18 0x00005555556c530c in PyRun_FileExFlags (fp=fp@entry=0x555555b6d000, 
    filename_str=filename_str@entry=0x7ffff7ecf720 "/home/asottile/workspace/cpython/t2.py", start=start@entry=257, globals=globals@entry=0x7ffff7ecf3b0, 
    locals=locals@entry=0x7ffff7ecf3b0, closeit=closeit@entry=1, 
    flags=0x7fffffffddc0) at Python/pythonrun.c:1063
#19 0x00005555556c56e6 in PyRun_SimpleFileExFlags (fp=fp@entry=0x555555b6d000, 
    filename=<optimized out>, 
    filename@entry=0x7ffff7ecf720 "/home/asottile/workspace/cpython/t2.py", 
    closeit=closeit@entry=1, flags=flags@entry=0x7fffffffddc0)
    at Python/pythonrun.c:428
#20 0x00005555556c58e9 in PyRun_AnyFileExFlags (fp=fp@entry=0x555555b6d000, 
    filename=0x7ffff7ecf720 "/home/asottile/workspace/cpython/t2.py", 
    closeit=closeit@entry=1, flags=flags@entry=0x7fffffffddc0)
    at Python/pythonrun.c:86
#21 0x00005555555aceca in pymain_run_file (config=config@entry=0x555555b2f190, 
    cf=cf@entry=0x7fffffffddc0) at Modules/main.c:369
#22 0x00005555555ad698 in pymain_run_python (
    exitcode=exitcode@entry=0x7fffffffddf4) at Modules/main.c:553
#23 0x00005555555ad703 in Py_RunMain () at Modules/main.c:632
#24 0x00005555555ad77d in pymain_main (args=args@entry=0x7fffffffde50)
    at Modules/main.c:662
#25 0x00005555555ad843 in Py_BytesMain (argc=<optimized out>, 
    argv=<optimized out>) at Modules/main.c:686
---Type <return> to continue, or q <return> to quit---
#26 0x00005555555ac053 in main (argc=<optimized out>, argv=<optimized out>)
    at ./Programs/python.c:16
History
Date User Action Args
2020-01-05 01:14:44Anthony Sottilesetrecipients: + Anthony Sottile
2020-01-05 01:14:43Anthony Sottilesetmessageid: <1578186883.98.0.791148821148.issue39215@roundup.psfhosted.org>
2020-01-05 01:14:43Anthony Sottilelinkissue39215 messages
2020-01-05 01:14:42Anthony Sottilecreate