[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> wont fix
stage:  -> 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



[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I suspect backporting the fix to older versions won't be possible.

Yeah, very much the case unfortunately

--

___
Python tracker 

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



[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +pablogsal
title: MemoryError -> MemoryError in codeop.compile_command
versions: +Python 3.8

___
Python tracker 

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



[issue47137] MemoryError

2022-03-28 Thread qiu


qiu <1425166...@qq.com> added the comment:

y

--

___
Python tracker 

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



[issue47137] MemoryError

2022-03-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

A simpler reproducer is:
codeop.compile_command('[' * 100)

Verified I get MemoryError on cygwin PYthon 3.8.12. A length of 99 does not 
show a problem.

On Windows 3.11.0a5+, I get:

>>> codeop.compile_command('[' * 201)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\home\eric\local\python\cpython\Lib\codeop.py", line 107, in 
compile_command
return _maybe_compile(_compile, source, filename, symbol)
   ^^
  File "C:\home\eric\local\python\cpython\Lib\codeop.py", line 70, in 
_maybe_compile
compiler(source + "\n", filename, symbol)
^
  File "C:\home\eric\local\python\cpython\Lib\codeop.py", line 86, in _compile
return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT | 
PyCF_ALLOW_INCOMPLETE_INPUT)
   
^^^
  File "", line 1


[

^
SyntaxError: too many nested parentheses

A length of 200 seems to work correctly.

So it looks like this was fixed somewhere along the line, I'm guessing with the 
PEG parser. I suspect backporting the fix to older versions won't be possible.

--
nosy: +eric.smith

___
Python tracker 

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



[issue47137] MemoryError

2022-03-27 Thread qiu

qiu <1425166...@qq.com> added the comment:

hello,Did you get the E-mail about one random input I sent you?
one random input is
[O[m[[E[[[ly[[))
looking forward to your reply! thanks!

--原始邮件--
发件人:
"Python tracker"

https://bugs.python.org/issue47137;
___

--

___
Python tracker 

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



[issue47137] MemoryError

2022-03-27 Thread qiu


qiu <1425166...@qq.com> added the comment:

9

--

___
Python tracker 

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



[issue47137] MemoryError

2022-03-27 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

Python 3.6 reach end of life in December 2021, is this error reproducible in 
Python 3.7 and above?

If that is still the case, do you have an example of an exact input causing 
this crash? "random input" is not a lot to go by.

--
nosy: +ajoino

___
Python tracker 

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



[issue47137] MemoryError

2022-03-27 Thread qiu

New submission from qiu <1425166...@qq.com>:

Traceback (most recent call last):
  File "python_AFL.py", line 110, in runFuzzer
runtime = runApplication(input_path, mode)
  File "python_AFL.py", line 75, in runApplication
exec(f.read(), {'buff': input_data})
  File "", line 16, in 
  File "", line 10, in fuzz
  File "/usr/lib/python3.6/codeop.py", line 122, in compile_command
return _maybe_compile(_compile, source, filename, symbol)
  File "/usr/lib/python3.6/codeop.py", line 82, in _maybe_compile
code = compiler(source, filename, symbol)
  File "/usr/lib/python3.6/codeop.py", line 102, in _compile
return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT)
MemoryError

when I use codeop.compile_command( random input ), I get the error .
I wonder if I found the error with the Python codeop's library??
thanks!

--
messages: 416120
nosy: Leilei
priority: normal
severity: normal
status: open
title: MemoryError
type: crash

___
Python tracker 

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