Ignore:
Timestamp:
May 8, 2009, 10:25:53 PM (16 years ago)
Author:
[email protected]
Message:

2009-05-08 Geoffrey Garen <[email protected]>

Reviewed by Cameron Zwarich.


Fixed <rdar://problem/6634956> CrashTracer: [REGRESSION] >400 crashes
in Safari at com.apple.JavaScriptCore • JSC::BytecodeGenerator::emitComplexJumpScopes + 468
https://bugs.webkit.org/show_bug.cgi?id=25658

  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitComplexJumpScopes): Guard the whole loop with a bounds check. The old loop logic would decrement and read topScope without a bounds check, which could cause crashes on page boundaries.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r43401 r43428  
    17271727        }
    17281728
    1729         // To get here there must be at least one finally block present
    1730         do {
    1731             ASSERT(topScope->isFinallyBlock);
     1729        while (topScope > bottomScope && topScope->isFinallyBlock) {
    17321730            emitJumpSubroutine(topScope->finallyContext.retAddrDst, topScope->finallyContext.finallyAddr);
    17331731            --topScope;
    1734             if (!topScope->isFinallyBlock)
    1735                 break;
    1736         } while (topScope > bottomScope);
     1732        }
    17371733    }
    17381734    return emitJump(target);
Note: See TracChangeset for help on using the changeset viewer.