Crash IE with 1 Line of Javascript

There are several ways to reliably [tag]crash IE[/tag] but this one is possibly the simplest and most effective way. All you need to do is to put the following line of j[tag]avascript[/tag] somewhere on your page:

for (x in document.write) { document.write(x);}

It will cause a catastrophic [tag]crash[/tag] in [tag]IE[/tag] 6.0 and below. In my case it actually caused a repeating [tag]memory read error[/tag] that just kept popping up until I killed the iexplore.exe process:

IE Memory Read Error
click to enlarge

You can see an example of this error here. Note that the linked page will crash IE unless you have Javascript disabled. Most other browsers should be completely unaffected, and render the page normally. Also check out the description of this error at the original source.

I find it amazing amazing how a single malformed line of code can cause such a crash. In fact this problem has been known for quite some time now. Why was it not patched yet?

This entry was posted in Uncategorized. Bookmark the permalink.



6 Responses to Crash IE with 1 Line of Javascript

  1. Matt UNITED KINGDOM Mozilla Firefox Windows Terminalist says:

    I think i heard of this before – reading the article gave me deja vu :?
    hm… maybe this code should be put into pro-alternative browser websites to show the crappitude of IE

    although it would probably do their cause more harm than good

    maybe a link to that code and an explanation of what will happen as a demonstration of how stupid it is

    Reply  |  Quote
  2. Fr3d UNITED KINGDOM Mozilla Firefox Windows says:

    “[…] Why was it not patched yet?”

    This is Microsoft we’re talking about here… :P

    Might be funny to try with some newb friends tho :D

    Reply  |  Quote
  3. StarHawk UNITED STATES Mozilla Firefox Windows says:

    That’s hilarious, I had stumbled across it before but never took the time to look at it in IE. I use firefox of course, and it’s actually been acting kinda buggy itself lately and I ain’t happy with it. I need to take the time to try to figure out what’s wrong. I suspect an extension or two actually. But any way …

    It acts as ya say dude, it “caused a repeating memory read error that just kept popping up until I killed the iexplore.exe process” for me at least running an up to date version of win 2000 pro tweaked up a little bit on a piece of junk.

    All programs of sufficient complexity are buggy and in fact a true mathematical verification of a program is about impossible fer all but simplest most trivial pieces of code. And then ya got the assumption the hardware is actually working right. How many transistors did ya say? lol. But regardless this ought to be highly embaressing to uncle bill there. And I too wonder why it hasn’t been patched? Perhaps they haven’t even figured out where in the code the problem is. Perhaps they don’t care after all the program works almost reliably most of the time. Till some smart ass shows how buggy it truly is. haha.

    Reply  |  Quote
  4. Matt UNITED KINGDOM Mozilla Firefox Windows Terminalist says:

    For me it justs throws up a general eroor message – “IE has encountered a problem and needs to close”, then I get to choose whether or not to error report it

    (thats winxp home)

    Reply  |  Quote
  5. StarHawk UNITED STATES Mozilla Firefox Windows says:

    I get that message too, but IE pops back up. lots of fun. haha

    Reply  |  Quote
  6. Luke UNITED STATES Mozilla Firefox Windows says:

    Supposedly IE7 beta is immune to this so there is still hope.

    Interestingly enough I got that memory error on XP home. I also got the standard “this program needs to close” but like StatHawk said – it just pops back up and starts with the memory thing.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *