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

more friendly/useful error for stack overflow in type inference #44971

Merged
merged 2 commits into from
Apr 15, 2022

Conversation

JeffBezanson
Copy link
Member

fixes #44852

@JeffBezanson JeffBezanson added error handling Handling of exceptions by Julia or the user compiler:inference Type inference labels Apr 13, 2022
@JeffBezanson
Copy link
Member Author

JeffBezanson commented Apr 13, 2022

With #44970:

julia> foldr(+, Tuple(1:5000))
Internal error: stack overflow in type inference of foldr(Function, NTuple{5000, Int64}).
This might be caused by recursion over very long tuples or argument lists.
12502500

julia> 

src/gf.c Outdated Show resolved Hide resolved
@aviatesk aviatesk merged commit 401d578 into master Apr 15, 2022
@aviatesk aviatesk deleted the jb/typeinfovf branch April 15, 2022 15:43
@NHDaly
Copy link
Member

NHDaly commented Apr 18, 2022

awesome, thanks! :)

@staticfloat staticfloat added the backport 1.8 Change should be backported to release-1.8 label Jul 18, 2022
KristofferC pushed a commit that referenced this pull request Jul 20, 2022
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:inference Type inference error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StackOverflow Type Inference Error
6 participants