It seems to me the multithreading is not working correctly because of the stack manipulations. Do any of you feel the same? For example, try this code on php:
[code]
&\11111111111111!
\000000000 !
[/code]
It works according to the definition. Don't forget that the memory is shared. The thread 0 has stack pointer pointing further than the thread 1, so thread 0 writes before thread 1 reaches the position and thread 1 rewrites ones by zeros.