Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Segfault on f-string in ast3 #30

Closed
ilevkivskyi opened this issue Feb 16, 2017 · 3 comments · Fixed by #32
Closed

Segfault on f-string in ast3 #30

ilevkivskyi opened this issue Feb 16, 2017 · 3 comments · Fixed by #32

Comments

@ilevkivskyi
Copy link
Member

This happens:

Python 3.5.1 |Anaconda custom (x86_64)| (default, Dec  7 2015, 11:24:55) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin

>>> from typed_ast import ast3
>>> ast3.parse("x = f'Hi {x}'")
Segmentation fault: 11

Unfortunately, I could not test this on other versions of Python now.

@ilevkivskyi
Copy link
Member Author

I discovered it fails even on correct f-strings:

>>> ast3.parse("x = 3; f'Hi {x}'")
Segmentation fault: 11

f-strings without variables inside are parsed correctly without error.

@ilevkivskyi ilevkivskyi changed the title Segfault on erroneous f-string in ast3 Segfault on f-string in ast3 Feb 16, 2017
@refi64
Copy link

refi64 commented Feb 16, 2017

I remember this had happened in #22, but I don't remember what I did to fix it...

@ilevkivskyi
Copy link
Member Author

OK, found it, here is the fix #32

tbbharaj pushed a commit to tbbharaj/typed_ast that referenced this issue Dec 6, 2021
Development branch fixes for 0.9.1 release
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants