-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed as not planned
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
Description
Bug report
We did a fuzzing test on Python3.9.15, a recursion error happened.
from pyclbr import *
import pyclbr
import io
import tokenize
from token import DEDENT
from token import NAME
from token import OP
class demoCls():
def __init__(self):
pass
def demoFunc(self, arg1,arg2):
try:
ret = pyclbr.readmodule_ex(arg1,arg2)
except (AttributeError, ImportError, ModuleNotFoundError, OSError, StopIteration, TypeError, ValueError, tokenize.StopTokenizing, tokenize.TokenError):
pass
module = '.'* 100_100
path = None
dc = demoCls()
dc.demoFunc(module, path)
Bug info
Traceback (most recent call last):
File "/root/fuzzVuls/Python3.9.15/pyclbr.readmodule_ex/1#pyclbr#readmodule_ex.py", line 24, in <module>
dc.demoFunc(module, path)
File "/root/fuzzVuls/Python3.9.15/pyclbr.readmodule_ex/1#pyclbr#readmodule_ex.py", line 16, in demoFunc
ret = pyclbr.readmodule_ex(arg1,arg2)
File "/root/anaconda3/lib/python3.9/pyclbr.py", line 116, in readmodule_ex
return _readmodule(module, path or [])
File "/root/anaconda3/lib/python3.9/pyclbr.py", line 149, in _readmodule
parent = _readmodule(package, path, inpackage)
File "/root/anaconda3/lib/python3.9/pyclbr.py", line 149, in _readmodule
parent = _readmodule(package, path, inpackage)
File "/root/anaconda3/lib/python3.9/pyclbr.py", line 149, in _readmodule
parent = _readmodule(package, path, inpackage)
[Previous line repeated 993 more times]
File "/root/anaconda3/lib/python3.9/pyclbr.py", line 140, in _readmodule
if module in sys.builtin_module_names and inpackage is None:
RecursionError: maximum recursion depth exceeded in comparison
My environment
CPython: 3.9.15
Ubuntu: 18.0.4 (x86 64)
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided