-
Notifications
You must be signed in to change notification settings - Fork 582
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
Infinite loop on parameter that shadows a name in its own type #923
Labels
Comments
Oof. Thanks for the bug report @andersk! |
andersk
added a commit
to andersk/zulip
that referenced
this issue
Jun 5, 2020
They confuse semgrep, and also, like, people in general. semgrep/semgrep#923 Signed-off-by: Anders Kaseorg <anders@zulip.com>
timabbott
pushed a commit
to zulip/zulip
that referenced
this issue
Jun 5, 2020
They confuse semgrep, and also, like, people in general. semgrep/semgrep#923 Signed-off-by: Anders Kaseorg <anders@zulip.com>
clarammdantas
pushed a commit
to clarammdantas/zulip
that referenced
this issue
Jun 5, 2020
They confuse semgrep, and also, like, people in general. semgrep/semgrep#923 Signed-off-by: Anders Kaseorg <anders@zulip.com>
Jagansivam28
pushed a commit
to Jagansivam28/zulip
that referenced
this issue
Jun 8, 2020
They confuse semgrep, and also, like, people in general. semgrep/semgrep#923 Signed-off-by: Anders Kaseorg <anders@zulip.com>
It's a bug in the Naming_AST.ml phase. |
aryx
added a commit
to semgrep/pfff
that referenced
this issue
Jun 9, 2020
This should fix semgrep/semgrep#923 The issue was that we now annotate certain expression Id with their type, but in some languages such as Python where there is no clean types, they use expressions to represent type and those type can then contain Id that will get associate a type and create cycle in the generic AST, which then lead certain code (e.g., dumper) to loop forever. test plan: regression tests included make test ~/pfff/pfff -naming_generic shadow_...py does not loop forever anymore
aryx
added a commit
to semgrep/pfff
that referenced
this issue
Jun 9, 2020
This is related to semgrep/semgrep#923 In my previous fix I've disabled the recursion on OtherType to avoid creating cycles in the AST but doing so I've introduced some regressions in semgrep (in tests/python/misc_regression1.py) because we were not resolving correctly aliases anymore. This fixes the fix. Test plan: + /home/pad/pfff/pfff -dump_ast -naming_generic python/misc_regression1.py now shows the right id_resolved and we still do not go into infinite loop
aryx
added a commit
that referenced
this issue
Jun 10, 2020
Show that issue #923 is also fixed with latest pfff
aryx
added a commit
that referenced
this issue
Jun 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
This case, reduced from
zulip/zerver/lib/email_mirror.py
, causessemgrep
to spin in an infinite loop:https://semgrep.live/GdeG
Pattern:
Code:
The text was updated successfully, but these errors were encountered: