Closed Bug 228759 Opened 16 years ago Closed 16 years ago

freeze with javascirpt code: while (1) { document.write('<tr><td>X</td></tr>'); }

Categories

(Core :: JavaScript Engine, defect, critical)

x86
Linux
defect
Not set
critical

Tracking

()

VERIFIED DUPLICATE of bug 13350

People

(Reporter: eggdrop, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Mozilla will freeze if I go to a webpage with the following code:
<table cellpadding="1" cellspacing="1" border="1">
<script type="text/javascript">
while (1)
{
  document.write('<tr><td>X</td></tr>');
}
</script>


Reproducible: Always

Steps to Reproduce:
1.create a page with the above code
2.go to this page

Actual Results:  
mozilla freezes and uses 100% of the CPU power

Expected Results:  
a) detect the while(1) loop and ask the user whether mozilla should run the
script or not
b) render only the first 100 or 1000 rows

-

*** This bug has been marked as a duplicate of 13350 ***
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
reporter, please search through bugs before reporting any bug, thanks
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.