• Seth Brenith's avatar
    [debug] Don't crash when breaking on entry to functions with heap vars · 3c20dfed
    Seth Brenith authored
    Any function with heap-allocated variables starts by creating and
    pushing a new context for its execution. When entering the debugger due
    to the stack check in the beginning of InterpreterEntryTrampoline, the
    function has not yet had a chance to push that new context. The code in
    ScopeIterator currently assumes that any function which needs a context
    already has one by the time the debugger attempts to iterate scopes, but
    in this case that assumption is invalid, which can cause a null deref.
    
    This change introduces a new function ScopeIterator::NeedsAndHasContext
    to replace previous calls to current_scope_->NeedsContext(). This new
    function checks for the case where the current scope matches the closure
    scope but the context matches the containing context for the function,
    which implies that the function has not yet pushed its own context.
    
    Bug: v8:10319, chromium:1038747
    Change-Id: I29636f269c44d35b68d8446769d17170eed50e89
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2168021
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67519}
    3c20dfed
Name
Last commit
Last update
..
debug-prepare-step-in.js Loading commit data...
regress-102153.js Loading commit data...
regress-10319.js Loading commit data...
regress-1081309.js Loading commit data...
regress-109195.js Loading commit data...
regress-1170187.js Loading commit data...
regress-119609.js Loading commit data...
regress-131994.js Loading commit data...
regress-147497.js Loading commit data...
regress-1523.js Loading commit data...
regress-1586.js Loading commit data...
regress-1639.js Loading commit data...
regress-2296.js Loading commit data...
regress-269.js Loading commit data...
regress-2825.js Loading commit data...
regress-325676.js Loading commit data...
regress-3717.js Loading commit data...
regress-392114.js Loading commit data...
regress-4309-1.js Loading commit data...
regress-4309-2.js Loading commit data...
regress-4309-3.js Loading commit data...
regress-4320.js Loading commit data...
regress-4703.js Loading commit data...
regress-491536.js Loading commit data...
regress-5071.js Loading commit data...
regress-514362.js Loading commit data...
regress-5164.js Loading commit data...
regress-5279.js Loading commit data...
regress-5559.js Loading commit data...
regress-617882.js Loading commit data...
regress-662674.js Loading commit data...
regress-662935.js Loading commit data...
regress-9067.js Loading commit data...
regress-crbug-107996.js Loading commit data...
regress-crbug-119800.js Loading commit data...
regress-crbug-171715.js Loading commit data...
regress-crbug-222893.js Loading commit data...
regress-crbug-323936.js Loading commit data...
regress-crbug-387599.js Loading commit data...
regress-crbug-401915.js Loading commit data...
regress-crbug-405922.js Loading commit data...
regress-crbug-409614.js Loading commit data...
regress-crbug-432493.js Loading commit data...
regress-crbug-465298.js Loading commit data...
regress-crbug-467180.js Loading commit data...
regress-crbug-487289.js Loading commit data...
regress-crbug-491943.js Loading commit data...
regress-crbug-568477-1.js Loading commit data...
regress-crbug-568477-2.js Loading commit data...
regress-crbug-568477-3.js Loading commit data...
regress-crbug-568477-4.js Loading commit data...
regress-crbug-582048.js Loading commit data...
regress-crbug-582051.js Loading commit data...
regress-crbug-605581.js Loading commit data...
regress-crbug-609046.js Loading commit data...
regress-crbug-621361.js Loading commit data...
regress-crbug-633999.js Loading commit data...
regress-debug-code-recompilation.js Loading commit data...
regress-debug-context-load.js Loading commit data...
regress-debug-deopt-while-recompile.js Loading commit data...
regress-frame-details-null-receiver.js Loading commit data...
regress-opt-after-debug-deopt.js Loading commit data...
regress-prepare-break-while-recompile.js Loading commit data...