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 [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-269.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-1523.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-1586.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
regress-1639.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
regress-2296.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
regress-2825.js Convert all CRLF to LF 2018-05-07 18:55:09 +00:00
regress-3717.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-4309-1.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-4309-2.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-4309-3.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-4320.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-4703.js [debugger] Basic scope functionality and exception events in wrapper 2016-11-08 14:54:10 +00:00
regress-5071.js [ignition/turbo] Perform liveness analysis on the bytecodes 2016-11-29 12:27:15 +00:00
regress-5164.js [generators] Store parameters in the generator object. 2018-05-24 11:41:37 +00:00
regress-5279.js [cleanup] Add %PrepareFunctionForOptimize for tests that use %OptimizeOsr 2019-06-18 16:47:29 +00:00
regress-5559.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-9067.js Redirect BytecodeArray pointers on stack when clearing DebugInfo 2019-04-11 13:01:44 +00:00
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 [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
regress-109195.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
regress-119609.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
regress-131994.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
regress-147497.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-325676.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
regress-392114.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-491536.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-514362.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-617882.js [debug-wrapper] remove last uses of --expose-debug-as 2016-12-19 10:44:34 +00:00
regress-662674.js [debug] Disable debug events if JS execution is disallowed 2016-11-09 12:30:33 +00:00
regress-662935.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
regress-1081309.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
regress-1170187.js [parser] Don't create proxies for vars without initialisers 2019-01-28 15:54:40 +00:00
regress-crbug-107996.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
regress-crbug-119800.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
regress-crbug-171715.js Reland "[Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile" 2017-08-17 13:21:44 +00:00
regress-crbug-222893.js [turbofan] Support inline allocation of mapped outer arguments. 2017-09-01 09:52:59 +00:00
regress-crbug-323936.js [parser] Allow declaring variables without a proxy 2019-01-25 09:10:59 +00:00
regress-crbug-387599.js [cleanup] Add %PrepareFunctionForOptimize for tests that use %OptimizeOsr 2019-06-18 16:47:29 +00:00
regress-crbug-401915.js [debugger] Stepping and break-related functions in wrapper 2016-11-08 13:54:37 +00:00
regress-crbug-405922.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-crbug-409614.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-crbug-432493.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
regress-crbug-465298.js [mjsunit] Remove non-existing flags from tests. 2017-05-02 08:53:51 +00:00
regress-crbug-467180.js [ignition] removed nop bytecode 2017-07-18 16:14:29 +00:00
regress-crbug-487289.js [debug-wrapper] Adapt tests, breakpoint.actual_location 2016-11-21 09:29:17 +00:00
regress-crbug-491943.js [debug-wrapper] Adapt tests, breakpoint.actual_location 2016-11-21 09:29:17 +00:00
regress-crbug-568477-1.js [debug-wrapper] adapt stepping tests to inspector behavior. 2016-11-23 12:38:35 +00:00
regress-crbug-568477-2.js [debug-wrapper] adapt stepping tests to inspector behavior. 2016-11-23 12:38:35 +00:00
regress-crbug-568477-3.js [debug-wrapper] adapt stepping tests to inspector behavior. 2016-11-23 12:38:35 +00:00
regress-crbug-568477-4.js [debug-wrapper] adapt stepping tests to inspector behavior. 2016-11-23 12:38:35 +00:00
regress-crbug-582048.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-crbug-582051.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
regress-crbug-605581.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
regress-crbug-609046.js [debugger] Basic scope functionality and exception events in wrapper 2016-11-08 14:54:10 +00:00
regress-crbug-621361.js [debug-wrapper] Adapt tests, breakpoint.actual_location 2016-11-21 09:29:17 +00:00
regress-crbug-633999.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-debug-code-recompilation.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-debug-context-load.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
regress-debug-deopt-while-recompile.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-frame-details-null-receiver.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
regress-opt-after-debug-deopt.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
regress-prepare-break-while-recompile.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00