Weird runtime Crash
I’m sure you like such summaries... but I could not do any better.
In the attached tarball is some code and a test.sh that can be used to show the bug. I tried to further reduce the size of the test case, but I’m in a position where any of numerous seemingly independent changes would cause the crash to not happen, including removing an unused binding of the form "blubb <- return undefined", merging two Modules, removing unused imports or removing unused definitions.
Also disabling -O2 or -prof hides the patch.
I have attached my attempts to reduce the size of the testcase as a patch. Some code positions that can trigger or untrigger the bug are marked.