v8/test/debugger/debug/regress
Seth Brenith 3c20dfeda1 [debug] Don't crash when breaking on entry to functions with heap vars
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: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67519}
2020-05-01 18:21:36 +00:00
..
debug-prepare-step-in.js
regress-269.js
regress-1523.js
regress-1586.js
regress-1639.js
regress-2296.js
regress-2825.js
regress-3717.js
regress-4309-1.js
regress-4309-2.js
regress-4309-3.js
regress-4320.js
regress-4703.js
regress-5071.js
regress-5164.js
regress-5279.js
regress-5559.js
regress-9067.js
regress-10319.js [debug] Don't crash when breaking on entry to functions with heap vars 2020-05-01 18:21:36 +00:00
regress-102153.js
regress-109195.js
regress-119609.js
regress-131994.js
regress-147497.js
regress-325676.js
regress-392114.js
regress-491536.js
regress-514362.js
regress-617882.js
regress-662674.js
regress-662935.js
regress-1081309.js
regress-1170187.js
regress-crbug-107996.js
regress-crbug-119800.js
regress-crbug-171715.js
regress-crbug-222893.js
regress-crbug-323936.js
regress-crbug-387599.js
regress-crbug-401915.js
regress-crbug-405922.js
regress-crbug-409614.js
regress-crbug-432493.js
regress-crbug-465298.js
regress-crbug-467180.js
regress-crbug-487289.js
regress-crbug-491943.js
regress-crbug-568477-1.js
regress-crbug-568477-2.js
regress-crbug-568477-3.js
regress-crbug-568477-4.js
regress-crbug-582048.js
regress-crbug-582051.js
regress-crbug-605581.js
regress-crbug-609046.js
regress-crbug-621361.js
regress-crbug-633999.js
regress-debug-code-recompilation.js
regress-debug-context-load.js
regress-debug-deopt-while-recompile.js
regress-frame-details-null-receiver.js
regress-opt-after-debug-deopt.js
regress-prepare-break-while-recompile.js