Skip to content
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

[WIP] Fixing an Infinite Loop case in UnmatchedChecker. #4881

Merged
merged 4 commits into from
Feb 26, 2020

Conversation

MarisaKirisame
Copy link
Contributor

the below code will cause the unmatched case in type checker to hang. The problem is that the expand function will contract but it shouldnt. Will upload a fix tmr.
%P~A9741EKF$9@6LAV{B ZA
W E(V~9 E4DM`BU_U3@GBOE

@MarisaKirisame
Copy link
Contributor Author

@slyubomirsky

@slyubomirsky
Copy link
Contributor

Excellent catch, thank you for finding a repro.

As we privately discussed, this appears to be a problem in expanding the wildcards: there is a line that potentially erases information from candidates, violating the invariant that expanded candidates should always be larger than the original ones. This should essentially require a one-line change in ExpandWildcards (I will let you get to it)

@slyubomirsky
Copy link
Contributor

@MarisaKirisame are you planning to update, or should I make the changes myself?

@MarisaKirisame
Copy link
Contributor Author

I will do it myself. Was hoping mike will try it...

@slyubomirsky
Copy link
Contributor

@MarisaKirisame I hate to be a nuisance, but I wanted to give another reminder so we don't forget to fix this case

@MarisaKirisame
Copy link
Contributor Author

@slyubomirsky @zhiics @junrushao1994 can you guys review?

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only one minor question.



def test_inf_loop_case():
code = """
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be aligned in the raw string? Not sure if it will cause parsing problem.

@jroesch jroesch merged commit b422f6a into apache:master Feb 26, 2020
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 26, 2020
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 28, 2020
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants