You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the following example, "X" takes long computation and then it crashes Jython.
test.py
big = 1073741824
type("X" * big, (), {"__slots__": big})
Crash report:
(base) xxm@xxm-System-Product-Name:~/Desktop/IFuzzer/bugs/Jython$ jython 'test.py'
"my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15.
Traceback (most recent call last):
File "test.py", line 2, in
type("X" * big, (), {"slots": big})
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at java.lang.String.(String.java:166)
at org.python.core.PyString.repeat(PyString.java:685)
at org.python.core.PyString.str___mul__(PyString.java:698)
at org.python.core.PyString.mul(PyString.java:690)
at org.python.core.PyObject._basic_mul(PyObject.java:2229)
at org.python.core.PyObject._mul(PyObject.java:2215)
at org.python.pycode._pyx0.f$0(/home/xxm/Desktop/IFuzzer/bugs/Jython/17645.py:2)
at org.python.pycode._pyx0.call_function(/home/xxm/Desktop/IFuzzer/bugs/Jython/17645.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:235)
at org.python.util.jython.run(jython.java:247)
at org.python.util.jython.main(jython.java:129)
java.lang.OutOfMemoryError: java.lang.OutOfMemoryError: Java heap space
The expected output:
OverflowError
System:
Ubuntu 16.04
Jython 2.5.3
OpenJDK 64-Bit Server VM (Private Build) on java1.8.0_292
The text was updated successfully, but these errors were encountered:
See the following example, "X" takes long computation and then it crashes Jython.
test.py
Crash report:
The expected output:
System:
The text was updated successfully, but these errors were encountered: