Odin
Odin copied to clipboard
Very long expressions cause stack overflow during type checking
Context
Odin: dev-2024-06:80592f0f5
OS: Windows 10 Home Basic (version: 22H2), build 19045.4529
CPU: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
RAM: 65343 MiB
Backend: LLVM 17.0.1
Expected Behavior
No matter how long an expression is, the compiler should either be able to compile or it should refuse to compile it with a helpful error message.
Current Behavior
While typechecking a long series of compilie-time string concatenations, the compiler has a stack overflow.
It's possible the overflow threshold is lower on Windows, as this same file did not cause trouble on Linux.
Confirmed that a workaround is to represent that giant string another way
Failure Information (for bugs)
Seems to be reproduced consistently on a file I have in my project that creates a long list of icons and their names in one big string.
Steps to Reproduce
- unzip the files into a package called
icons - import the package
- in main, print
ALL_THE_ICONSwith fmt.println
You can probably create a similar test case quite easily
Useful Files
I'm able to reproduce this on Linux, but I need an absurd amount of text/concatenations to do it.
Confirmed on Windows. It works up to this point, but allow ARROW_UP_RIGHT + " ARROW_UP_RIGHT\n" and it's busted.