Hi Geert,
This looks like a serious bug in the SpiderMonkey 1.8.5 JavaScript compiler. I haven't seen anything similar to this before (well, not at least since the wonderful times of the 6502, 8088, 68000, and the like
![smile :)](http://pixinsight.com/forum/Smileys/default/smile.gif)
)
WARNING: This bug is potentially dangerous, especially on 64-bit systems. Do not try to reproduce this bug unless you have full knowledge of what you are doing. You probably will have to reset or switch off your machine if you experience this bug.The bug is easily reproducible. The following script causes it each time it is compiled:
for ( var i = 0; i < 100; ++i )
{
let a = i;
Indeed, the problem is in the lacking right bracket at the end of the script. Apparently, when the compiler tries to compile the above code it requests allocation of a huge amount of memory, which leads to generation of a monster swap disk file. On my Linux laptop (Fedora 14 x86_64) I cannot stop the process by any means and I have to switch the machine off. This bug behaves just as a denial-of-service attack.
Please be careful with this problem when writing and compiling scripts. I'll try to contact the Mozilla JS team to see what I can find to solve this issue as soon as possible. Sorry for the inconvenience.