Changeset 195246 in webkit


Ignore:
Timestamp:
Jan 18, 2016 8:08:56 PM (8 years ago)
Author:
sbarati@apple.com
Message:

assertions in BytecodeUseDef.h about opcode length are off by one
https://bugs.webkit.org/show_bug.cgi?id=153215

Reviewed by Dan Bernstein.

  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r195238 r195246  
     12016-01-18  Saam barati  <sbarati@apple.com>
     2
     3        assertions in BytecodeUseDef.h about opcode length are off by one
     4        https://bugs.webkit.org/show_bug.cgi?id=153215
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * bytecode/BytecodeUseDef.h:
     9        (JSC::computeUsesForBytecodeOffset):
     10
    1112016-01-18  Saam barati  <sbarati@apple.com>
    212
  • trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h

    r194248 r195246  
    7474    case op_inc:
    7575    case op_resume: {
    76         ASSERT(opcodeLengths[opcodeID] >= 1);
     76        ASSERT(opcodeLengths[opcodeID] > 1);
    7777        functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
    7878        return;
     
    8787    case op_jless:
    8888    case op_copy_rest: {
    89         ASSERT(opcodeLengths[opcodeID] >= 2);
     89        ASSERT(opcodeLengths[opcodeID] > 2);
    9090        functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
    9191        functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
     
    9494    case op_put_by_val_direct:
    9595    case op_put_by_val: {
    96         ASSERT(opcodeLengths[opcodeID] >= 3);
     96        ASSERT(opcodeLengths[opcodeID] > 3);
    9797        functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
    9898        functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
     
    104104    case op_put_to_scope:
    105105    case op_put_to_arguments: {
    106         ASSERT(opcodeLengths[opcodeID] >= 3);
     106        ASSERT(opcodeLengths[opcodeID] > 3);
    107107        functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
    108108        functor(codeBlock, instruction, opcodeID, instruction[3].u.operand);
     
    111111    case op_put_getter_by_id:
    112112    case op_put_setter_by_id: {
    113         ASSERT(opcodeLengths[opcodeID] >= 4);
     113        ASSERT(opcodeLengths[opcodeID] > 4);
    114114        functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
    115115        functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);
     
    117117    }
    118118    case op_put_getter_setter_by_id: {
    119         ASSERT(opcodeLengths[opcodeID] >= 5);
     119        ASSERT(opcodeLengths[opcodeID] > 5);
    120120        functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
    121121        functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);
     
    125125    case op_put_getter_by_val:
    126126    case op_put_setter_by_val: {
    127         ASSERT(opcodeLengths[opcodeID] >= 4);
     127        ASSERT(opcodeLengths[opcodeID] > 4);
    128128        functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
    129129        functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
     
    167167    case op_create_scoped_arguments:
    168168    case op_get_from_arguments: {
    169         ASSERT(opcodeLengths[opcodeID] >= 2);
     169        ASSERT(opcodeLengths[opcodeID] > 2);
    170170        functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
    171171        return;
Note: See TracChangeset for help on using the changeset viewer.