If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

instruction count reset during a call bytecode

VERIFIED FIXED in 1.5R5

Status

Rhino
Core
VERIFIED FIXED
14 years ago
14 years ago

People

(Reporter: Ming-Yee Iu, Assigned: Norris Boyd)

Tracking

other
1.5R5
x86
Windows 2000

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: 

In org.mozilla.javascript.Interpreter.interpret(...), the instruction count 
gets reset during the processing of Token.CALL bytecodes. I'm not sure if this 
behavior is intentional, but it differs from the behavior of the 
Icode_CALLSPECIAL bytecode. 

In any case, I think the solution is to remove line 2322:

   cx.instructionCount = instructionCount;

which does not appear in the handler for the similar Icode_CALLSPECIAL bytecode.

Reproducible: Always

Steps to Reproduce:
1. Create a Context that observes the instruction counts
2. run some Javascript code in an infinite loop that calls a function

Actual Results:  
Context.observeInstructionCount() never gets called


Expected Results:  
Context.observeInstructionCount() should get called occasionally

Comment 1

14 years ago
Created attachment 130714 [details] [diff] [review]
Fix: removing instruction counter reset as suggested.

Comment 2

14 years ago
I committed the fix.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Comment 3

14 years ago
Rubber-stamp vrfy -
Status: RESOLVED → VERIFIED

Comment 4

14 years ago
Trageting as resolved against 1.5R5
Target Milestone: --- → 1.5R5
You need to log in before you can comment on or make changes to this bug.