v8/test
Anna Henningsen 3176bfd447 [heap-profiler] Fix crash when a snapshot deleted while taking one
Fix a crash/hang that occurred when deleting a snapshot during the
GC that is part of taking another one.

Specifically, when deleting the only other snapshot in such
a situation, the `v8::HeapSnapshot::Delete()` method sees that there
is only one (complete) snapshot at that point, and decides that it is
okay to perform “delete all snapshots” instead of just deleting
the requested one. That resets the internal string lookup table
of the heap profiler, but the new snapshot that is currently in
progress still holds references to the old string lookup table,
leading to a use-after-free segfault or infinite loop.

Fix this by guarding against resetting the string table while
another heap snapshot is being taken, and add a test that would
crash before this fix.

This can be triggered in Node.js by repeatedly calling
`v8.getHeapSnapshot()`, which provides heap snapshots as weakly
held host objects.

Change-Id: If9ac3728bf79114000982f1e7bb05e8034299e3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2464823
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70445}
2020-10-12 12:21:18 +00:00
..
benchmarks [test] Skip some slow benchmarks 2020-09-14 08:43:44 +00:00
cctest [heap-profiler] Fix crash when a snapshot deleted while taking one 2020-10-12 12:21:18 +00:00
common [wasm-simd][arm64] prototype i64x2 widen i32x4 2020-10-08 00:09:40 +00:00
debugger [debug] consider Object.keys free of side effects 2020-10-01 10:40:02 +00:00
debugging [Py3] Fix flake8 warnings 2020-07-10 16:57:15 +00:00
fuzzer [wasm][fuzzer] Fix data race when setting flags 2020-10-05 16:31:11 +00:00
fuzzilli Fix unhandled promise rejections in REPRL mode 2020-09-30 13:34:23 +00:00
inspector [wasm][debug] Ignore empty local names. 2020-10-05 10:42:51 +00:00
intl [intl] Fix timezone bug in test 2020-10-05 14:41:51 +00:00
js-perf-test [super property speed] Invert benchmark graphs 2020-08-31 09:24:46 +00:00
memory Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
message Reland "[d8] Avoid recursive unhandled rejected Promise processing" 2020-09-23 08:12:59 +00:00
mjsunit [wasm-gc] Cleanup/preparation to enable call_ref with WasmJSFunction 2020-10-09 11:24:22 +00:00
mkgrokdump [heap] Move BaseSpace into base-space.h 2020-06-19 09:38:24 +00:00
mozilla [Respect] Prefer inclusive terms 2020-06-22 18:11:23 +00:00
test262 Reland "[intl] Impl ECMA402 PR 471 rounding behavior" 2020-10-02 00:14:46 +00:00
torque Reland "[torque] typed context slot access" 2020-08-06 11:32:38 +00:00
unittests cppgc: Add bailout for concurrent marking 2020-10-09 15:04:32 +00:00
wasm-api-tests [ukm][wasm] Add event WasmModuleDecoded 2020-08-17 12:44:33 +00:00
wasm-js [wasm] Update spec tests 2020-10-09 17:51:14 +00:00
wasm-spec-tests [wasm] Update spec tests 2020-10-09 17:51:14 +00:00
webkit Disallow \8 and \9 in strict mode and template literals 2020-08-03 18:05:14 +00:00
BUILD.gn [turbofan] Make OSR and stack slots compatible 2020-10-05 17:41:02 +00:00
OWNERS