v8/src
Seth Brenith 6e9f5de2ab Fix crashes introduced by "Fix leaks due to deoptimization literals"
My previous change https://crrev.com/c/3160299 introduced a runtime
CHECK that crashes the process if V8 attempts to read a deoptimization
literal which has been cleared. That CHECK is indeed crashing the
process.

It appears that the trouble arises in cases where the deoptimization
data indicates that an object should be materialized as needed. In those
cases, one of the deoptimization literals is the Map to use when
materializing the object. It is possible to reach a part of the code
that requires the materialized object, and therefore the Map, without
there being any other owner of that Map. This is in contrast to most
other deoptimization literals, which are logically equivalent to omitted
values from the stack frame and therefore can't be reached without a
real owner somewhere to keep them alive.

To fix, I propose referring to Maps strongly from the deoptimization
literals. The cases I investigated in v8:4578 didn't involve Maps, so I
believe that the observed memory leaks are still fixed with this change.

Bug: chromium:1268681, chromium:1268683, chromium:1268825, v8:12300
Change-Id: Ifd32a7f9cc29e0384650013ab16e05646bf57895
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272880
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77857}
2021-11-11 18:25:11 +00:00
..
api [api][tracing] Add more startup traces 2021-11-11 10:03:28 +00:00
asmjs [ext-code-space] Avoid Code <-> CodeT conversions in runtime, pt.1 2021-11-08 14:08:24 +00:00
ast [compiler-dispatcher] Move to full SFI keying 2021-11-04 15:11:44 +00:00
base [base] Extend SmallVector for use with Zone storage 2021-11-08 07:52:46 +00:00
baseline [heap] Support mprotect off thread 2021-11-10 17:52:37 +00:00
bigint Skip the readability/check rule on bigint directory 2021-11-09 14:57:49 +00:00
builtins s390x: [baseline] port Generate_BaselineOnStackReplacement 2021-11-10 17:51:35 +00:00
codegen [loong64][mips64] Fix a Int64Mul error in instruction selection. 2021-11-11 03:47:27 +00:00
common [ext-code-space] Fix external code range allocation logic 2021-11-11 08:25:47 +00:00
compiler [compiler] Fix -Wshadow 2021-11-11 17:17:01 +00:00
compiler-dispatcher [compiler-dispatcher] Focus API around SFIs, not literals 2021-11-05 10:10:11 +00:00
d8 [api] Change host-defined options to v8::Data 2021-11-09 14:00:13 +00:00
date [date] Skip leading zeros when parsing date string 2021-10-28 11:49:10 +00:00
debug [runtime][json] Add IncrementalStringBuilder::AppendCStringLiteral 2021-11-10 11:58:54 +00:00
deoptimizer Fix leaks due to deoptimization literals 2021-11-09 19:02:59 +00:00
diagnostics [diagnostics] Fix -Wshadow 2021-11-11 17:18:08 +00:00
execution Revert "[heap] Support multiple clients in shared GC" 2021-11-11 12:38:37 +00:00
extensions [interpreter] Port GetDispatchCountersObject to internal 2021-08-25 09:50:51 +00:00
flags Reland "[baseline] Enable concurrent sparkplug on future" 2021-11-11 16:46:51 +00:00
handles [handles] Branch hints and force-inline in HandleScope 2021-11-11 07:56:47 +00:00
heap [heap] Remove code space depth check in CodePageCol**Scope 2021-11-11 16:42:51 +00:00
ic [class] fix evaluation order and errors in private accessor assignments 2021-11-09 15:36:28 +00:00
init Revert "[heap] Support multiple clients in shared GC" 2021-11-11 12:38:37 +00:00
inspector [inspector] Cache StackFrames by script, line and column number. 2021-11-11 07:34:27 +00:00
interpreter [interpreter] Fix block resurrection by LoopHeader 2021-11-11 13:59:32 +00:00
json [runtime][json] Add IncrementalStringBuilder::AppendCStringLiteral 2021-11-10 11:58:54 +00:00
libplatform Introduce v8_enable_virtual_memory_cage 2021-08-11 16:13:42 +00:00
libsampler Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
logging Adds counter for snapshot decompress time when creating context 2021-11-10 16:01:25 +00:00
numbers [cleanup] Fix -Wshadow in src/numbers/ 2021-09-27 07:54:29 +00:00
objects Fix crashes introduced by "Fix leaks due to deoptimization literals" 2021-11-11 18:25:11 +00:00
parsing [parsing] Fix -Wshadow warnings 2021-11-11 17:35:51 +00:00
profiler Fix leaks due to deoptimization literals 2021-11-09 19:02:59 +00:00
protobuf Remove petermarshall from OWNERS 2021-03-31 11:00:22 +00:00
regexp [regexp] Fix -Wshadow warnings 2021-11-09 01:31:57 +00:00
roots [string] Add a is_shared bit to strings and String::Share 2021-11-10 23:55:47 +00:00
runtime [runtime][json] Add IncrementalStringBuilder::AppendCStringLiteral 2021-11-10 11:58:54 +00:00
sanitizer Reland "[elements] Avoid racy data reads/writes" 2021-05-06 10:46:52 +00:00
security Introduce CagedPointer 2021-10-29 13:36:07 +00:00
snapshot [api][tracing] Add more startup traces 2021-11-11 10:03:28 +00:00
strings [runtime][json] Add IncrementalStringBuilder::AppendCStringLiteral 2021-11-10 11:58:54 +00:00
tasks Remove rmcilroy from OWNERS. 2021-08-19 16:30:27 +00:00
third_party Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
torque [torque] Emit full codesearch links for source positions 2021-11-11 10:38:47 +00:00
tracing [base] Move utils/vector.h to base/vector.h 2021-06-18 13:33:13 +00:00
trap-handler [trap-handler] Fix -Wshadow warnings 2021-10-15 23:09:46 +00:00
utils [utils] Fix -Wshadow warnings 2021-11-11 17:19:10 +00:00
wasm [wasm] Grow indirect function tables exponentially 2021-11-10 06:23:32 +00:00
web-snapshot [web snapshots] Rewrite object discovery in the d8 snapshotter 2021-11-09 13:59:10 +00:00
zone [regexp] Release regexp zone memory during JS parsing 2021-11-02 11:56:11 +00:00
DEPS cppgc: Prohibit Oilpan usage from within V8 2021-08-25 08:24:33 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
OWNERS Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00