What's the shortest code to cause a stack overflow?

Chris Jester-Young picture Chris Jester-Young · Sep 15, 2008 · Viewed 35.6k times · Source

To commemorate the public launch of Stack Overflow, what's the shortest code to cause a stack overflow? Any language welcome.

ETA: Just to be clear on this question, seeing as I'm an occasional Scheme user: tail-call "recursion" is really iteration, and any solution which can be converted to an iterative solution relatively trivially by a decent compiler won't be counted. :-P

ETA2: I've now selected a “best answer”; see this post for rationale. Thanks to everyone who contributed! :-)

Answer

jrudolph picture jrudolph · Sep 15, 2008

Read this line, and do what it says twice.