[issue46339] PEG parser segfault from ast.literal_eval

2022-01-20 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 1fb1f5d8bd084c20f0a5fde547b563c08d103f09 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-46339: Fix crash in the parser when computing error text for 
multi-line f-strings (GH-30529) (GH-30542)
https://github.com/python/cpython/commit/1fb1f5d8bd084c20f0a5fde547b563c08d103f09


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 8c2fd09f365e082cfceb29afdf38953cdd670946 by Pablo Galindo Salgado 
in branch 'main':
bpo-46339: Include clarification on assert in 
'get_error_line_from_tokenizer_buffers' (#30545)
https://github.com/python/cpython/commit/8c2fd09f365e082cfceb29afdf38953cdd670946


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +28743
pull_request: https://github.com/python/cpython/pull/30545

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28740
pull_request: https://github.com/python/cpython/pull/30542

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread miss-islington


miss-islington  added the comment:


New changeset cedec19be81e6bd153678bfb28c8e217af8bda58 by Pablo Galindo Salgado 
in branch 'main':
bpo-46339: Fix crash in the parser when computing error text for multi-line 
f-strings (GH-30529)
https://github.com/python/cpython/commit/cedec19be81e6bd153678bfb28c8e217af8bda58


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +28730
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/30529

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The reason is that the line numbers are now correctly identified, and that 
causes existing code to not work correctly :(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Seems that the regression is caused by this commit:

6fa8b2ceee38187b0ae96aee12fe4f0a5c8a2ce7 is the first bad commit
commit 6fa8b2ceee38187b0ae96aee12fe4f0a5c8a2ce7
Author: Pablo Galindo Salgado 
Date:   Sat Jan 8 00:23:40 2022 +

bpo-46237: Fix the line number of tokenizer errors inside f-strings 
(GH-30463)

 Lib/test/test_exceptions.py  | 12 
 .../2022-01-07-19-33-05.bpo-46237.9A6Hpq.rst |  2 ++
 Parser/pegen.c   |  8 
 Parser/string_parser.c   |  5 -
 4 files changed, 22 insertions(+), 5 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Core and 
Builtins/2022-01-07-19-33-05.bpo-46237.9A6Hpq.rst

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-10 Thread Kumar Aditya


Kumar Aditya  added the comment:

I tested it on 3.10.1 and it didn't segfault on Windows 11 so seems like 3.11 
regression.

--
nosy: +kumaraditya303

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-10 Thread Gregory P. Smith


New submission from Gregory P. Smith :

cpython/b$ ./python 
Python 3.11.0a3+ (heads/main-dirty:081a214008, Jan 11 2022, 02:48:22) [GCC 
11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.literal_eval('''F"""
... 
... 
... {6
... 0="""''')
Segmentation fault

this was discovered by oss-fuzz.

This may be a recent regression?  It didn't happen on my build from a few weeks 
ago.  worth testing on older versions.

--
assignee: pablogsal
components: Parser
messages: 410270
nosy: gregory.p.smith, lys.nikolaou, pablogsal
priority: normal
severity: normal
stage: needs patch
status: open
title: PEG parser segfault from ast.literal_eval
type: crash
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com