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
Crash on REPL mode with long text copy and paste #83390
Comments
When I copy and paste the pretty long text into REPL shell. This issue is only reproducible on macOS, [origin text] [macOS] Python 3.9.0a2+ (heads/master:7dc72b8d4f, Jan 4 2020, 23:22:45)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = """<?xml version="1.0" encoding="iso-8859-1"?>
... <test>
... <Users>
... <fun25>
... <limits>
... <total>0KiB</total>
... <kbps>0</kbps>
... <rps>1.3</rps>
... <connections>0</connections>
... </limits>
... <usages>
... <total>16738211KiB</total>
... <kbps>237.15</kbps>
... <rps>1.3</rps>
... <connections>0</connections>
... </usages>
... <time_to_refresh>never</time_to_refresh>
... <limit_exceeded_URL>none</limit_exceeded_URL>
... </fun25>
... </Users>
... </test>
... """
Assertion failed: ((intptr_t)(int)(a - line_start) == (a - line_start)), function parsetok, file Parser/parsetok.c, line 324.
[1] 13389 abort ./python.exe [linux] Python 3.9.0a2+ (heads/master-dirty:7dc72b8, Jan 4 2020, 23:22:11)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = """<?xml version="1.0" encoding="iso-8859-1"?>
<test>
<Users>
<fun25>
<limits>
<total>0KiB</total>
<kbps>0</kbps>
<rps>true</rps>
<connections>0</connections>
</limits>
<usages>
<total>16738211KiB</total>
<kbps>237.15</kbps>
<rps>true</rps>
<connections>0</connections>
</usages>
<time_to_refresh>never</time_to_refresh>
<limit_exceeded_URL>none</limit_exceeded_URL>
</fun25>
</Users>
</test>
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... """
>>> a
'<?xml version="1.0" encoding="iso-8859-1"?>\n<test>\n <Users>\n <fun25>\n <limits>\n <total>0KiB</total>\n <kbps>0</kbps>\n <rps>true</rps>\n <connections>0</connections>\n </limits>\n <usages>\n <total>16738211KiB</total>\n <kbps>237.15</kbps>\n <rps>true</rps>\n <connections>0</connections>\n </usages>\n <time_to_refresh>never</time_to_refresh>\n <limit_exceeded_URL>none</limit_exceeded_URL>\n </fun25>\n </Users>\n</test>\n'
>>> |
I bisected this to this commit: 995d9b9 is the first bad commit
Lib/test/test_ast.py | 19 +++++++++++++ |
Works correct with PR 17860 :) Python 3.9.0a2+ (heads/pr/17860:958541d67c, Jan 6 2020, 20:45:49)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = """<?xml version="1.0" encoding="iso-8859-1"?>
... <test>
... <Users>
... <fun25>
... <limits>
... <total>0KiB</total>
... <kbps>0</kbps>
... <rps>1.3</rps>
... <connections>0</connections>
... </limits>
... <usages>
... <total>16738211KiB</total>
... <kbps>237.15</kbps>
... <rps>1.3</rps>
... <connections>0</connections>
... </usages>
... <time_to_refresh>never</time_to_refresh>
... <limit_exceeded_URL>none</limit_exceeded_URL>
... </fun25>
... </Users>
... </test>
... """
>>> a
'<?xml version="1.0" encoding="iso-8859-1"?>\n<test>\n <Users>\n <fun25>\n <limits>\n <total>0KiB</total>\n <kbps>0</kbps>\n <rps>1.3</rps>\n <connections>0</connections>\n </limits>\n <usages>\n <total>16738211KiB</total>\n <kbps>237.15</kbps>\n <rps>1.3</rps>\n <connections>0</connections>\n </usages>\n <time_to_refresh>never</time_to_refresh>\n <limit_exceeded_URL>none</limit_exceeded_URL>\n </fun25>\n </Users>\n</test>\n'
>>> |
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: