
This will crash your browser. - asadlionpk
http://jsfiddle.net/n3Wa3/embedded/result/
======
thaumaturgy
Yep. Back in 2008 or thereabouts, I threw together
[http://crashmybrowser.com/](http://crashmybrowser.com/) (note that this page
will not immediately crash your browser, it's very polite about asking first).
I only spent a short amount of time on it and haven't touched it since, but at
a quick check, it looks like at least a couple of the tests are still
effective.

The site has a note, under "why", along the lines of resource limitations and
process separation for tabs being a good idea. 5 years later, it still is.

On the plus side, all of the browsers have changed their UI a lot during those
5 years.

edit: looks like Chrome (or Chromium) has aged more gracefully than Firefox.
It handles everything on the page with a minimum amount of fuss. Good. :-)

~~~
asadlionpk
nice!

------
lutusp
You really want to post a link that locks up people's browsers? I can think of
a dozen ways to do this, but why would I inconvenience people just to show off
a trivial self-evident fact?

And "crash" is an exaggeration. The browser is prevented from functioning
until it figures out that its processing power is being absorbed in something
pointless, for example by badly written JavaScript:

    
    
        function loop_forever() {
          while(true) {
          }
        }
    

A modern browser assigns a thread to each process and monitors each thread, so
it can act to stop unresponsive threads. That's what happens in this case.
It's not a "crash", unless bringing a car to a safe stop at a red light counts
as a crash.

~~~
fooyc
After freezing for a few seconds it really crashed my Firefox, showing the
crash reporting UI and everything. In chrome, the tab crashes too, but not the
whole browser.

For those interested, the responsible code is located here:

dontclick://fiddle.jshell.net/n3Wa3/show/light/

And here is the code:

    
    
        <script>
        function Hackology()
        {
            var buffer = '\x42';
            for (i =0;i<666;i++)
            {
                buffer+=buffer+'\x42';
                document.write('<html><marquee><h1>'+buffer+buffer);
            }
        }
        </script>

~~~
deletes
Doesn't look very advanced. Maybe I'm missing something.

~~~
lutusp
Anyone who posts a link with the tag, "this will crash your browser" clearly
isn't aiming very high, certainly not at "advanced".

------
dlsym
> This will crash your browser.

No. Waited about five minutes. No crash.

~~~
deletes
Should be: This will crash your browser if you enable javascript.

Opera did crash though.

------
asadlionpk
I posted this because this code crashed IE, Chrome on Win7 and it also crashed
on my iPod, Android and WinPhone8 devices.

~~~
lutusp
But any bit of trivial JavaScript code can crash a certain class of browser
(the class without independent threads) -- it doesn't require even a small bit
of cleverness.

It's just not newsworthy, and it's a public nuisance to post such examples --
I mean a working example, as opposed to an inert code listing.

~~~
asadlionpk
I am sorry, but I found the code behind it interesting so posted it. I put it
on jsfiddle! If you were smart enough, you could have accessed the html behind
the page easily.

like this: view-
source:[http://fiddle.jshell.net/n3Wa3/show/light/](http://fiddle.jshell.net/n3Wa3/show/light/)

OR

[http://jsfiddle.net/zalun/n3Wa3/embedded/html/](http://jsfiddle.net/zalun/n3Wa3/embedded/html/)

My point being, browsers should be able to recover from such code. What if
some site's ad code has this in it. It shouldn't be able to crash my entire
browser.

~~~
lutusp
>> it's a public nuisance to post such examples -- I mean a working example,
as opposed to an inert code listing.

> I am sorry, but I found the code behind it interesting so posted it.

You should have posted a listing, not a working copy. That would have been the
civilized, non-destructive thing to do.

> If you were smart enough, you could have accessed the html behind the page
> easily.

I did. But if you were smart enough, you would have done that and avoided
performing an unscheduled test of the less technically skilled visitors'
browsers ability to handle broken code.

> My point being, browsers should be able to recover from such code.

Why not set your car on fire? A modern car should be able to tolerate the
flames, right? Where's your sense of adventure?

You just aren't thinking. This is a public forum visited by people
representing all levels of skill.

------
BigChiefSmokem
IE10 in Windows 8 did not crash and recovered. All other tabs where a-okay.

------
drill_sarge
can't tell because JS is only enabled on whitelisted sites here ;)

------
tirant
No, it does not.

Chrome for Win32 here.

------
anonygoofy
lynx survives

~~~
lutusp
Indeed it does -- it tries to run the JavaScript, decides it's crap, and
handily recovers. Good old Lynx.

