Closed Bug 696342 Opened 13 years ago Closed 13 years ago

Javascript: Infinite loop iterating through caller with an eval function

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 694454

People

(Reporter: kleines_eichhoernchen, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

Attached file firefox.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1

Steps to reproduce:

when I iterating through the function caller stack, i will run into an infinite loop, when the function was called by a eval.

eval('getRootCaller()');

function getRootCaller() {
	var c = getRootCaller.caller;
	while (c.caller) {
		c = c.caller;
	}
	
	alert(c.toString());
}


Actual results:

in my test file, i have two buttons. the first one iterates through the callers without eval. the second one with eval and i will run into a infinite loop.

in Firefox 6.01 I does'nt run into an infinite loop
Regression window(m-c)
Works:
http://hg.mozilla.org/mozilla-central/rev/d578ca1a42e7
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110620 Firefox/7.0a1 ID:20110620130955
Fails:
http://hg.mozilla.org/mozilla-central/rev/a285146675dc
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110621 Firefox/7.0a1 ID:20110621030803
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d578ca1a42e7&tochange=a285146675dc


Regression window(TM)
Works:
http://hg.mozilla.org/tracemonkey/rev/e59b1d2a2f79
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110617 Firefox/7.0a1 ID:20110617173815
Fails:
http://hg.mozilla.org/tracemonkey/rev/9ced98ee3aa9
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110618 Firefox/7.0a1 ID:20110618050724
Pushlog:
http://hg.mozilla.org/tracemonkey/pushloghtml?fromchange=e59b1d2a2f79&tochange=9ced98ee3aa9

Triggered by:
9ced98ee3aa9	Tom Schuster — Bug 640593 - Remove Function.arity and other cleanup around function properties r=jorendorff
Assignee: nobody → general
Blocks: 640593
Status: UNCONFIRMED → NEW
Component: General → JavaScript Engine
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: general → general
Version: 7 Branch → Trunk
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: