|
|
|
|
|
by zedshaw
4189 days ago
|
|
Alright my friend, here's the gist: https://gist.github.com/zedshaw/c20a69f17578909523c4 The rules: 1. You said you can make that for-loop run forever that can call it and it'll enter an infinite loop.
2. To prove that, you can only alter the main function, then hand me back the code and I'll compile it and run it on my machines.
3. It has to run without stopping for 24 hours. If you can do that then I'll consider that an "infinite loop".
4. You can't call any more functions than what's in there already. So no fancy hacks to keep the OS from allowing segfaults by putting in signal handlers, linking against other libraries, or anything. Very curious how you do this. This is fun! Edit: And, I may not be checking comments so email me to gloat if you figure it out. help@learncodethehardway.org any time. You can also post it here. Just link me the reply so I can go look. |
|
There's no need to run it for 24 hours. Just run it, then pause in the debugger and step through a few loops. It'll be evident that nothing changes.
If you need help getting it to work properly on your own setup, let me know.