Closed Bug 329404 Opened 14 years ago Closed 14 years ago

JavaScript flood processor and craches Mozilla, IE, Opera...

Categories

(SeaMonkey :: General, defect, critical)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 335256

People

(Reporter: elvenone, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.12) Gecko/20050915
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.12) Gecko/20050915

a simply javascript can cause to flood processor with functions (in 5 sec. 1024 pararel functions, in 5 sec. more its over milion paraler functions -> exponencial grow), cause the fastest machines to break down...

...
</head>
 <script language="JavaScript">
function x()
    {
   setInterval("x()", 500); //HERE IT HAPPENES
   document.getElementById('floatx').style.top = document.body.scrollTop;
   return
    }
</script>
<body onLoad="x()">

<table id="floatx" class="table_top">
...



Reproducible: Always

Steps to Reproduce:
1.load http://www.kolaudacia.sk/bug/relative_table.html
2.w8 about 10sec (depeends how fast your pc is)
3.mozilla and other browser dont react

Actual Results:  
mozilla and other browser dont react, windows slow down

Expected Results:  
- browser should control the time expectation before running scripts, and if its overlimits it should make a warning 
- user could set the maximal CPU amout needed to execute JavaScript
I think this is a duplicate of bug 261633.

*** This bug has been marked as a duplicate of 261633 ***
Group: security
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.