Staging
v0.8.1
v0.8.1
https://github.com/python/cpython
Revision 961703cdc82536b6ff897ad7d4b3bbf22718d1b5 authored by Miss Islington (bot) on 16 July 2020, 13:25:31 UTC, committed by GitHub on 16 July 2020, 13:25:31 UTC
GCC says ``` ../cpython/Parser/string_parser.c: In function ‘fstring_find_expr’: ../cpython/Parser/string_parser.c:404:93: warning: ‘cols’ may be used uninitialized in this function [-Wmaybe-uninitialized] 404 | p2->starting_col_offset = p->tok->first_lineno == p->tok->lineno ? t->col_offset + cols : cols; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ ../cpython/Parser/string_parser.c:384:16: note: ‘cols’ was declared here 384 | int lines, cols; | ^~~~ ../cpython/Parser/string_parser.c:403:45: warning: ‘lines’ may be used uninitialized in this function [-Wmaybe-uninitialized] 403 | p2->starting_lineno = t->lineno + lines - 1; | ~~~~~~~~~~~~~~~~~~^~~ ../cpython/Parser/string_parser.c:384:9: note: ‘lines’ was declared here 384 | int lines, cols; | ^~~~~ ``` and, indeed, if `PyBytes_AsString` somehow fails, lines & cols will not be initialized. (cherry picked from commit 2ad7e9c011b7606c5c7307176df07419a0e60134) Co-authored-by: Benjamin Peterson <benjamin@python.org>
1 parent f0f6566
Tip revision: 961703cdc82536b6ff897ad7d4b3bbf22718d1b5 authored by Miss Islington (bot) on 16 July 2020, 13:25:31 UTC
Fix possibly-unitialized warning in string_parser.c. (GH-21503)
Fix possibly-unitialized warning in string_parser.c. (GH-21503)
Tip revision: 961703c
File | Mode | Size |
---|---|---|
pegen | ||
pgen | ||
Python.asdl | -rw-r--r-- | 5.2 KB |
acceler.c | -rw-r--r-- | 3.3 KB |
asdl.py | -rw-r--r-- | 12.7 KB |
asdl_c.py | -rwxr-xr-x | 48.7 KB |
grammar1.c | -rw-r--r-- | 1.0 KB |
listnode.c | -rw-r--r-- | 1.7 KB |
myreadline.c | -rw-r--r-- | 11.9 KB |
node.c | -rw-r--r-- | 5.1 KB |
parser.c | -rw-r--r-- | 12.4 KB |
parser.h | -rw-r--r-- | 1.4 KB |
parsetok.c | -rw-r--r-- | 14.0 KB |
token.c | -rw-r--r-- | 4.5 KB |
tokenizer.c | -rw-r--r-- | 56.9 KB |
tokenizer.h | -rw-r--r-- | 3.8 KB |
Computing file changes ...