hughperman / pure-lang

Automatically exported from code.google.com/p/pure-lang
0 stars 0 forks source link

Crash in pure REPL on windows #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start command prompt
2. type pure
3. type x = x + 2;

What is the expected output? What do you see instead?
Expected: An error message?
Instead: A program crash

What version of the product are you using? On what operating system?
pure-0.47.msi

Original issue reported on code.google.com by tm1r...@gmail.com on 5 Apr 2011 at 12:46

GoogleCodeExporter commented 8 years ago
I missed step 4:
4: type x;

Original comment by tm1r...@gmail.com on 5 Apr 2011 at 1:04

GoogleCodeExporter commented 8 years ago
You're provoking a stack overflow there (the x function calls itself 
recursively). You need to set PURE_STACK to catch those.

See 
http://code.google.com/p/pure-lang/wiki/FAQ#The_interpreter_segfaults_when_I_com
pute_something_like_fact_100

Original comment by aggraef@gmail.com on 5 Apr 2011 at 1:42