v8/test/cctest/heap
Leszek Swirski 695d9b64ff [snapshot] Reland recent de/serializer related changes
This reverts commit 1aa9ab7384.

The reverted CL chain had an issue where ThinStrings could accidentally
end up in compilation artifacts, causing issues down the line with ICs
that expected direct internalized strings.

The reason for this bug was that forward references to internalized
strings were resolved before PostProcessNewObject. When this happened,
the internalized string A would be written to the field where it was
previously deferred, then PostProcessNewObject would change string A to
string A', and update string A to a ThinString.  This means any _future_
back references to A would see the ThinString and follow it to receive
A', but any _past_ forward references would keep pointing to the
ThinString A.

This reland fixes this by preventing InternalizedString deferral, so
that all references to InternalizedStrings are back references. It also
adds some additional verification to the heap verifier that constant
pools and object boilerplate descriptors aren't allowed to hold thin
strings.

This patch also fixes an additional bug in the original CL, where weak
forward refs weren't being serialized with a weak prefix.

Original change's description:
> Revert recent de/serializer related changes
>
> They are suspected to be causing Canary crashes, confirmed through
> local reverts and repro attempts.
>
> This reverts:
> - "Reland "[serializer] Change deferring to use forward refs""
>   commit 76d684cc82.
> - "Reland "[serializer] Remove new space""
>   commit 81231c23a9.
> - "[serializer] Clean-up and de-macro ReadDataCase"
>   commit c06d24b915.
> - "[serializer] DCHECK deserializer allocations are initialized"
>   commit fbc1f32d8e.
>
> Bug: chromium:1128872
> Change-Id: Id2bb3b8fac526fdf9ffb033222ae08cd423f8238
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414220
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69955}

Tbr: jgruber@chromium.org,dinfuehr@chromium.org
Bug: chromium:1075999
Bug: chromium:1127610
Bug: chromium:1128848
Bug: chromium:1128872
Bug: chromium:1128957
Change-Id: I8b7bbabf77eb8cb942a28316afbfaa5f9a0aa4cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2418101
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69988}
2020-09-18 10:14:59 +00:00
..
heap-tester.h [heap] Add large_object_threshold to AllocateRaw 2020-09-14 12:12:40 +00:00
heap-utils.cc [cctest][heap] Do not rely on page limit for full space simulation. 2020-09-10 12:46:50 +00:00
heap-utils.h Reland "[heap] Add concurrent typed slot recording" 2020-09-03 11:16:44 +00:00
test-alloc.cc Disable --stress-concurrent-allocation for tests that change free lists 2020-09-03 11:15:39 +00:00
test-array-buffer-tracker.cc [heap] Remove ArrayBufferTracker 2020-08-12 09:00:07 +00:00
test-compaction.cc [ptr-compr][ppc] Implement pointer compression 2020-05-06 19:06:32 +00:00
test-concurrent-allocation.cc Reland "[heap] Add concurrent typed slot recording" 2020-09-03 11:16:44 +00:00
test-concurrent-marking.cc [heap] Split marking worklist into global worklist and local worklists 2020-08-11 13:15:54 +00:00
test-embedder-tracing.cc Reland "[heap] Add concurrent typed slot recording" 2020-09-03 11:16:44 +00:00
test-external-string-tracker.cc Reland^2 "[heap] Move start of incremental marking in allocation" 2020-07-14 12:07:34 +00:00
test-heap.cc [snapshot] Reland recent de/serializer related changes 2020-09-18 10:14:59 +00:00
test-incremental-marking.cc Disable --stress-concurrent-allocation for tests that change free lists 2020-09-03 11:15:39 +00:00
test-invalidated-slots.cc Disable --stress-concurrent-allocation for tests that change free lists 2020-09-03 11:15:39 +00:00
test-iterators.cc Reland "[heap] Make ReadOnlySpace use bump pointer allocation" 2020-06-18 11:48:38 +00:00
test-lab.cc [torque] Use generated instance types, part 1 2019-10-28 18:30:31 +00:00
test-mark-compact.cc Disable --stress-concurrent-allocation for tests that change free lists 2020-09-03 11:15:39 +00:00
test-memory-measurement.cc [test] Fix UAF in cctest/test-memory-measurement/RandomizedTimeout 2020-07-10 08:52:00 +00:00
test-page-promotion.cc [heap] Remove ArrayBufferTracker 2020-08-12 09:00:07 +00:00
test-spaces.cc Disable --stress-concurrent-allocation for tests that change free lists 2020-09-03 11:15:39 +00:00
test-unmapper.cc Disable --stress-concurrent-allocation for tests that change free lists 2020-09-03 11:15:39 +00:00
test-weak-references.cc [nci] Replace CompilationTarget with a new Code::Kind value 2020-08-05 12:27:22 +00:00
test-write-barrier.cc [heap] Consolidate marking write barrier logic in MarkingBarrier 2020-07-07 10:34:37 +00:00