Closed Bug 436843 Opened 18 years ago Closed 16 years ago

crash if javascript has infinite recursion

Categories

(Core :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: ebaynegs, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4 the following javascript causes the browser to crash <script> var getElementsByClassName = function (classname,tagname) { if (document.getElementsByClassName) return getElementsByClassName(classname,tagname); if(unsafeWindow.Y.U.Dom.getElementsByClassName) return unsafeWindow.Y.U.Dom.getElementsByClassName(classname,tagname); else return false; } getElementsByClassName(); </script> Reproducible: Always Steps to Reproduce: 1. load test page Actual Results: browser crashes Expected Results: browser shouldnt crash
actually the test case can be reduced to the following code <script> var getElementsByClassName = function (classname,tagname) { if (document.getElementsByClassName) return getElementsByClassName(classname,tagname); } getElementsByClassName(); </script>
works for me with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 (Firefox 3 RC2 Candidate), no crash on testurl
Works for me, Firefox 3.0 RC1 on Linux and MacOSX. http://www.mozilla.com/firefox/all-rc.html Error Console says: Error: too much recursion Source File: http://steeev.freehostia.com/test/jsbug.htm Line: 4
Product: Firefox → Core
QA Contact: general → general
Infinitely-recursing JavaScript really shouldn't cause a crash. ebaynegs, does it still crash for you in Firefox 3.5?
Summary: crash if page includes specific javascript (getElementsByClassName) → crash if javascript has infinite recursion
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: