-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pylint
crashed with a IndexError
#7828
Comments
🤦♀️ and we thought this was fixed! |
Could you try upgrading to pylint 2.15.6 @a-is, please ? |
Sorry I wasn't specific enough, I'm pretty sure this is legitimate. The PR that touched code around this https://github.com/PyCQA/pylint/pull/7622/files didn't specifically handle for this. I'll take a look now. |
Oh wait a minute, I'm re-reading the issue description. so we know calling That is, should pylint handle the |
Yeah we should do our best so pylint does not crash. (As an aside I really dislike when C compiler equate "undefined behavior" with "the compiler can crash and roast your computer in the process".). But we don't go out of our way to never crash either by trying to anticipate everything, if it's never reported then.. who cares. (For example the "utf13" crash was not reported for a very long time) |
Great, I'll open a PR shortly |
I will be able to check the code for 2.15.6 a little later. I want to note that calling |
Don't worry about that I misunderstood what @clavedeluna was saying. Thank you for reporting so fast 👍 |
Bug description
I was writing code to process a file and accidentally made an error in it -- I forgot the argument of the
next
function. On checking such a pylint crash code. I tried to create an MRE, it turned out the following:if I replace
next()
tonext(file)
then code does not crash. If i removefor
loop pylynt also does not crash.Information from
pylint-crash-*.txt
file:pylint crashed with a
AstroidError
and with the following stacktrace:Command used
Pylint output
Expected behavior
pylint does not crash
Pylint version
OS / Environment
GNU/Linux
The text was updated successfully, but these errors were encountered: