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
Using an undefined variable in a method of a class may cause a segmentation fault. See the following example 'test.py', we define a class 'A' . In this class we define a method 'clone'. After for loop, we return the undefined variable i, then pyjion crashes.
test.py
class A:
js = []
def clone(self):
for i in self.js:
pass
return i
a = A()
a.clone()
Behaviors on Pyjion:
python3.10 -m pyjion test.py
Segmentation fault (core dumped)
Behaviors on CPython 3.10.8
python3.10 test.py
Traceback (most recent call last):
File "/home/xxm/Desktop/test.py", line 8, in
a.clone()
File "/home/xxm/Desktop/test.py", line 6, in clone
return I
UnboundLocalError: local variable 'i' referenced before assignment
Environment:
CPython3.10.8 on Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
Using an undefined variable in a method of a class may cause a segmentation fault. See the following example 'test.py', we define a class 'A' . In this class we define a method 'clone'. After for loop, we return the undefined variable i, then pyjion crashes.
test.py
Behaviors on Pyjion:
python3.10 -m pyjion test.py
Behaviors on CPython 3.10.8
python3.10 test.py
Environment:
CPython3.10.8 on Ubuntu 18.04
The text was updated successfully, but these errors were encountered: