- 24 Aug, 2022 1 commit
-
-
Michael Lippautz authored
Users should rely on CppHeap which is the only supported way of using v8::TracedReference in going forward. Bug: v8:13207 Change-Id: Idd03f458167c74b06f285bb568e5c77ad46003fe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849037Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/main@{#82681}
-
- 18 Aug, 2022 1 commit
-
-
Michael Lippautz authored
Traced nodes were allocated black, even outside of GCs. Nodes would always survive one GC, while the objects pointed to could die. This CL removes black allocation and relies on proper write barriers (that are anyways in place) to mark the nodes and their objects. This also means that marked nodes should always point to live objects which is now verified in the atomic pause. Bug: v8:13141 Change-Id: Ie5cdc92d8fe5f57865d02b71d3fae9425ae532fa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820070 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#82559}
-
- 10 Aug, 2022 1 commit
-
-
Michael Lippautz authored
This is a reland of commit 6953b555 The reland fixes tests that retrieved the stack start from a non-inlined frame's fp. This does not work in certain configurations as the resulting marker is too low to consider the first local variables in subsequent calls. The fix uses an inline frame address for the tests to get an upper bound of stack addresses to consider. Original change's description: > [handles] Remove precise on-stack representation of global handles > > Since https://crrev.com/c/3806439 on-stack traced handles are marked > conservatively when being used in combination with CppHeap. > > This change removes the precise on-stack representation of the > internal traced nodes as they nodes would anyways be marked > conservatively. The effects are: > - cheaper representation (just a single node space); > - uniform handling: no checks to distinguish on-stack vs on-heap; > - no brittleness around cleaning on-stack handles when the event loop > is empty; > > Change-Id: Id859623bfed77a66bdd064ea8065536264515eae > Bug: v8:13141 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812039 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#82306} Bug: v8:13141 Change-Id: I53ece36220e99d02be6df18f83c18450e5d5037b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820585Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82342}
-
- 09 Aug, 2022 3 commits
-
-
Michael Lippautz authored
This reverts commit 6953b555. Reason for revert: Failing on CI: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20full%20debug/22876/overview Original change's description: > [handles] Remove precise on-stack representation of global handles > > Since https://crrev.com/c/3806439 on-stack traced handles are marked > conservatively when being used in combination with CppHeap. > > This change removes the precise on-stack representation of the > internal traced nodes as they nodes would anyways be marked > conservatively. The effects are: > - cheaper representation (just a single node space); > - uniform handling: no checks to distinguish on-stack vs on-heap; > - no brittleness around cleaning on-stack handles when the event loop > is empty; > > Change-Id: Id859623bfed77a66bdd064ea8065536264515eae > Bug: v8:13141 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812039 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#82306} Bug: v8:13141 Change-Id: I5ebb2ed9eeec1394c2dd48504e91f6ff789b0711 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820584 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#82313}
-
Michael Lippautz authored
Since https://crrev.com/c/3806439 on-stack traced handles are marked conservatively when being used in combination with CppHeap. This change removes the precise on-stack representation of the internal traced nodes as they nodes would anyways be marked conservatively. The effects are: - cheaper representation (just a single node space); - uniform handling: no checks to distinguish on-stack vs on-heap; - no brittleness around cleaning on-stack handles when the event loop is empty; Change-Id: Id859623bfed77a66bdd064ea8065536264515eae Bug: v8:13141 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812039Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82306}
-
Dominik Inführ authored
Change-Id: I00acbcac8bbd86b502ef5d921bfcc9b2fa0f3860 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3816672 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82297}
-
- 04 Aug, 2022 1 commit
-
-
Michael Lippautz authored
v8::TracedReference is supposed to be used from objects allocated on CppHeap. Such objects can be in construction during garbage collection, meaning that they are unable to invoke Trace(v8::TraceReference) as they have not been properly set up. It is thus necessary to use conservative tracing to find v8::TracedReference (backed by TracedNode in GlobalHandle) in in-construction objects. Change-Id: I5b4ac6e7805ff7ded33f63a405db65ea08d809ad Bug: v8:13141, chromium:1322114 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3806439 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/main@{#82188}
-
- 01 Aug, 2022 1 commit
-
-
Nico Weber authored
clang now complains when a BitField for an enum is too wide. We could suppress this, but it seems kind of useful from an uninformed distance, so I made a few bitfields smaller instead. (For AddressingMode, since its size is target-dependent, I added an explicit underlying type to the enum instead, which suppresses the diag on a per-enum basis.) This is without any understanding of the code I'm touching. Especially the change in v8-internal.h feels a bit risky to me. Bug: chromium:1348574 Change-Id: I73395de593045036b72dadf4e3147b5f7e13c958 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3794708 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Hannes Payer <hpayer@chromium.org> Auto-Submit: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/main@{#82109}
-
- 22 Jun, 2022 1 commit
-
-
Michael Lippautz authored
Check against copying around a TracedReference containing a zap value. Bug: chromium:1322114 Change-Id: Ie97ecaf18931006516fc70be262829a267d1285c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3717323Reviewed-by:
Omer Katz <omerkatz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81293}
-
- 14 Jun, 2022 1 commit
-
-
Michael Lippautz authored
A TracedReference handle may be moved into a slot of an already processed object, requiring a write barrier. Bug: chromium:1322114 Change-Id: I9c1018422df896c5753b213ebc4a7a7df79c0d80 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3703840 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#81124}
-
- 09 Jun, 2022 1 commit
-
-
Michael Lippautz authored
Bug: v8:12819 Change-Id: I9150a8a8ffa38b0628eee0f399d403af6363c04d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695587Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81042}
-
- 13 May, 2022 1 commit
-
-
Clemens Backes authored
Now that we require C++17 support, we can just use the standard static_assert without message, instead of our STATIC_ASSERT macro. R=leszeks@chromium.org Bug: v8:12425 Change-Id: I1d4e39c310b533bcd3a4af33d027827e6c083afe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647353Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Hannes Payer <hpayer@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#80524}
-
- 10 May, 2022 1 commit
-
-
Michael Lippautz authored
Upon destroying a v8::TracedReference while concurrent marking is running, we merely reset the object pointer but do not get rid of the global handle. We were also restting the parameter which would read the internal state for a DCHECK. Remove this clearing as the parameter field is not used for v8::TracedReference. Bug: chromium:1324074 Change-Id: Ic21bad78deba0925e12c3fc1215b087d0ef5dd7a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637796Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80459}
-
- 28 Apr, 2022 1 commit
-
-
Michael Lippautz authored
- Rely on GCCallbacksScope to avoid nesting callbacks. - Use a single entrypoint consistently for all callsites. Change-Id: I6be1f749a2d6bfc9d5db4c84c753e9176472bce2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605821Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80268}
-
- 25 Apr, 2022 2 commits
-
-
Michael Lippautz authored
Young GlobalHandle nodes were processed during post processing which required a logic to defend against recursive GCs. This was originally designed in a delayed way as the list itself was only treated as an optimization and could thus be lazily cleared. Since this still happens in the atomic pause and every node needs to be visited, there's no advantage over just keeping it correct at all times. Bug: chromium:1319213 Change-Id: I199fc0be5e4b6ed5cbb60cf3b1452e37108cd4f8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3605281Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80161}
-
Michael Lippautz authored
The bit is immutable and set during construction of the meta data. The main thread needs to query this bit while the concurrent marker may be running. Bug: chromium:1319210 Change-Id: I811d8048a61a3c682245b34302b6078d91f9662a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599489Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80149}
-
- 22 Apr, 2022 1 commit
-
-
Michael Lippautz authored
Remove PENDING state as handles were always immediately transitioned into FREE or NEAR_DEATH state. Bug: v8:12672 Change-Id: I9a9d40b573e862282d41d7a4a3f9c8c8ed21b9e4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599473Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80119}
-
- 21 Apr, 2022 3 commits
-
-
Michael Lippautz authored
This reverts commit 2d394aca. Concurrrent marking for v8::TracedReference requires a single bit in global handles to be written concurrently. While no other bits require concurrent access, initialization still needs to properly publish the the bitfield. Publishing generally allows all bits to be read on any thread which is already used for some. The CL introduces acq/rel semantics on the actual object pointer for publishing the state. Bug: chromium:1315498, v8:12600 Change-Id: Ic50c7c0b647b8b609bcd899f6c9f73bee80303da Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596125Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80085}
-
Michael Lippautz authored
Removes V8-internal support for resurrecting finalizers in the garbage collector. The APIs have already been removed in http://crrev.com/c/3596174 Bug: v8:12672 Change-Id: Ia507e74659b61a2c8c08281d7f395aee51e3fe17 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3584115Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Hannes Payer <hpayer@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80078}
-
Michael Lippautz authored
Removes support for specifying weak handles with finalizers that allow for object resurrection. This CL removes the public facing APIs. Internal support will be removed in a follow up. Bug: v8:12672 Change-Id: Ia6ea269093aaa128caadb7508aca2e5a1254923c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596174 Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#80070}
-
- 12 Apr, 2022 1 commit
-
-
Michael Lippautz authored
Concurrrent marking for v8::TracedReference requires a single bit in global handles to be written concurrently. While no other bits require concurrent access, initialization still needs to properly publish the bits. Avoid this problem by just referring to a persistent marking bitmap that's always present and accessed concurrently, similar to V8's regular marking bitmap. Bug: chromium:1315498, v8:12600 Change-Id: I49ba1af0f5a0a8c7fd2865c7178a9a956bbd953e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3582920Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79946}
-
- 11 Apr, 2022 1 commit
-
-
Michael Lippautz authored
This is a reland of commit 1f0d7d20 The fix merges concurrent marking tasks when marking in the atomic pause. Without the fix, Oilpan markers would continue running concurrently, possibly discovering new V8 objects. This violates the assumption that the final transitive closure runs on a single thread. Original change's description: > cppgc-js: Concurrently process v8::TracedReference > > Adds concurrent marking for reaching through v8::TracedReference. > Before this CL, a v8::TracedReference would always be processed on the > main thread by pushing a callback for each encountered reference. > > This CL now wires up concurrent handling for such references. In particular: > - Global handles are already marked as well and not repurposed during > the same GC cycle. > - Since global handles are not repurposed, it is enough to > double-deref to the V8 object, checking for possible null pointers. > - The bitmap for global handle flags is mostly non-atomic, with the > markbit being the exception. > - Finally, all state is wired up in CppHeap. Concurrent markers keep > their own local worklist while the mutator marker directly pushes to > the worklist owned by V8. > > Bug: v8:12600 > Change-Id: Ia67dbd18a57dbcccf4dfb9ccfdb9ee438d27fe71 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516255 > Reviewed-by: Omer Katz <omerkatz@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79736} Bug: v8:12600 Change-Id: I8545041b2c7b3daf7ecea7e3a100e27534e9b8b5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3571887Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79919}
-
- 05 Apr, 2022 1 commit
-
-
Leszek Swirski authored
This reverts commit 1f0d7d20. Reason for revert: Speculative revert for roll failures in https://chromium-review.googlesource.com/c/chromium/src/+/3569445 Original change's description: > cppgc-js: Concurrently process v8::TracedReference > > Adds concurrent marking for reaching through v8::TracedReference. > Before this CL, a v8::TracedReference would always be processed on the > main thread by pushing a callback for each encountered reference. > > This CL now wires up concurrent handling for such references. In particular: > - Global handles are already marked as well and not repurposed during > the same GC cycle. > - Since global handles are not repurposed, it is enough to > double-deref to the V8 object, checking for possible null pointers. > - The bitmap for global handle flags is mostly non-atomic, with the > markbit being the exception. > - Finally, all state is wired up in CppHeap. Concurrent markers keep > their own local worklist while the mutator marker directly pushes to > the worklist owned by V8. > > Bug: v8:12600 > Change-Id: Ia67dbd18a57dbcccf4dfb9ccfdb9ee438d27fe71 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516255 > Reviewed-by: Omer Katz <omerkatz@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79736} Bug: v8:12600 Change-Id: I8a91dcd6880580207bf8d315b264edbe42a794e5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3568474 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Owners-Override: Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79778}
-
- 04 Apr, 2022 1 commit
-
-
Michael Lippautz authored
Adds concurrent marking for reaching through v8::TracedReference. Before this CL, a v8::TracedReference would always be processed on the main thread by pushing a callback for each encountered reference. This CL now wires up concurrent handling for such references. In particular: - Global handles are already marked as well and not repurposed during the same GC cycle. - Since global handles are not repurposed, it is enough to double-deref to the V8 object, checking for possible null pointers. - The bitmap for global handle flags is mostly non-atomic, with the markbit being the exception. - Finally, all state is wired up in CppHeap. Concurrent markers keep their own local worklist while the mutator marker directly pushes to the worklist owned by V8. Bug: v8:12600 Change-Id: Ia67dbd18a57dbcccf4dfb9ccfdb9ee438d27fe71 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516255Reviewed-by:
Omer Katz <omerkatz@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79736}
-
- 23 Mar, 2022 1 commit
-
-
Michael Lippautz authored
Remove deprecated TracedGlobal<>, greatly simplifying handling of traced references in general. Also saves a word per v8::TracedReference as there's no need to keep a possible callback around. Bug: v8:12603 Change-Id: Ice35d7906775b912d02e97a27a722b3e1cec28d9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532251Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79589}
-
- 07 Mar, 2022 1 commit
-
-
Michael Lippautz authored
Resurrecting finalizers cause all sorts of problems, from performance penalties when used to hard-to-debug memory leaks. There's no more usage left in Blink as well as V8 internally, so deprecate resurrecting finalizers. Bug: v8:12672 Change-Id: I998373d6468bbd3bd581a41dec8904de80561f43 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507991Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79394}
-
- 17 Feb, 2022 1 commit
-
-
Michael Lippautz authored
Avoid the lookup via heap()->incremental_marking() and instead cache the marking state on GlobalHandles itself. Change-Id: I2665681ad38983bf16d22e0a82dd10743877e520 Bug: chromium:1294661 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468903Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79138}
-
- 04 Feb, 2022 2 commits
-
-
Michael Lippautz authored
Replacement is v8::TracedReference in combination with v8::Global if a callback is really needed. Bug: v8:12603 Change-Id: Iae48fee2e6588a594d430c5f3a71ff0b3e67e5b2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439873Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78950}
-
Michael Lippautz authored
TracedNode is used as backing node for v8::TracedGlobal (with destructor) and v8::TracedReference (no destructor). A future change adds concurrent marking for TracedReference which requires that the node stays around until the atomic pause to avoid synchronization with the concurrent marker. This change prepares TracedNode in prolonging the lifetime until the it is actively cleared ("sweeped") in the atomic pause. This allows for spuriously keeping alive a TracedNode for an additional GC cycle in the case the the node was destroyed while the marker is running. We maintain eager clearing of nodes where possible, i.e., outside of incremental marking. Bug: v8:12600 Change-Id: I9688c83a42b70d352c84613485f37242b1b910a6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3436805Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78947}
-
- 18 Jan, 2022 1 commit
-
-
Anton Bikineev authored
When the stack is split in safe and unsafe parts, on-stack TracedReferences are allocated on the unsafe stack. What currently happens is that on GC we destroy all the on-stack references below the current frame of the *safe* stack. If the safe stack is allocated above the unsafe counterpart, then all the traced references will be preliminary destructed on GC. This CL fixes it by using __builtin___get_unsafe_stack_ptr() if -fsanitize=safe-stack is enabled. In addition, deduplicate OnStackTracedNodeSpace::IsOnStack() and Stack::IsOnStack() and move more logic into ::heap::base::Stack. Bug: chromium:1278780 Change-Id: I9582bb1321958b7ec8ef2c0c46b9e42d51bb6f94 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3395033Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Auto-Submit: Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/main@{#78660}
-
- 15 Dec, 2021 1 commit
-
-
Samuel Groß authored
This CL renames a number of things related to the V8 sandbox. Mainly, what used to be under V8_HEAP_SANDBOX is now under V8_SANDBOXED_EXTERNAL_POINTERS, while the previous V8 VirtualMemoryCage is now simply the V8 Sandbox: V8_VIRTUAL_MEMORY_CAGE => V8_SANDBOX V8_HEAP_SANDBOX => V8_SANDBOXED_EXTERNAL_POINTERS V8_CAGED_POINTERS => V8_SANDBOXED_POINTERS V8VirtualMemoryCage => Sandbox CagedPointer => SandboxedPointer fake cage => partially reserved sandbox src/security => src/sandbox This naming scheme should simplify things: the sandbox is now the large region of virtual address space inside which V8 mainly operates and which should be considered untrusted. Mechanisms like sandboxed pointers are then used to attempt to prevent escapes from the sandbox (i.e. corruption of memory outside of it). Furthermore, the new naming scheme avoids the confusion with the various other "cages" in V8, in particular, the VirtualMemoryCage class, by dropping that name entirely. Future sandbox features are developed under their own V8_SANDBOX_X flag, and will, once final, be merged into V8_SANDBOX. Current future features are sandboxed external pointers (using the external pointer table), and sandboxed pointers (pointers guaranteed to point into the sandbox, e.g. because they are encoded as offsets). This CL then also introduces a new build flag, v8_enable_sandbox_future, which enables all future features. Bug: v8:10391 Change-Id: I5174ea8f5ab40fb96a04af10853da735ad775c96 Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322981Reviewed-by:
Hannes Payer <hpayer@chromium.org> Reviewed-by:
Igor Sheludko <ishell@chromium.org> Reviewed-by:
Michael Achenbach <machenbach@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#78384}
-
- 29 Oct, 2021 1 commit
-
-
Michael Lippautz authored
Bug: v8:12165 Change-Id: I6852686d67fac46fab536e93f8a63843f0580d3b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3251172Reviewed-by:
Maya Lekova <mslekova@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77606}
-
- 28 Oct, 2021 2 commits
-
-
Michael Lippautz authored
Stack containment checks for slots should consider safe stacks when they are enabled. Bug: v8:11933, v8:12165 Change-Id: I2e2c8539c3c0a2dd795f87781ecb2942e059accc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3250642 Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77601}
-
Michael Lippautz authored
TracedReferenceBase use (traced) global handles to implement the referencs. Provide a write barrier in the corresponding handle methods. Doing so - avoids bugs by having embedders taking care of write barrier management. - speeds up the barrier as it is better integrated in the handle methods. Drive-by: We don't need write barriers on initializating stores. Bug: v8:12165 Change-Id: Ie49cc3783aeed576fd46c957c473c61362fefbf2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3247039 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77593}
-
- 24 Aug, 2021 1 commit
-
-
Dan Elphick authored
This is a reland of d1b27019 Fixes include: Adding missing file to bazel build Forward-declaring classing before friend-classing them to fix win/gcc Add missing v8-isolate.h include for vtune builds Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit Bug: v8:11965 Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76460}
-
- 23 Aug, 2021 2 commits
-
-
Dan Elphick authored
This reverts commit d1b27019. Reason for revert: Broke vtune build, tsan build and possibly others Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Bug: v8:11965 Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Owners-Override: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#76428}
-
Dan Elphick authored
This moves every single class/function out of include/v8.h into a separate header in include/, which v8.h then includes so that externally nothing appears to have changed. Every include of v8.h from inside v8 has been changed to a more fine-grained include. Previously inline functions defined at the bottom of v8.h would call private non-inline functions in the V8 class. Since that class is now in v8-initialization.h and is rarely included (as that would create dependency cycles), this is not possible and so those methods have been moved out of the V8 class into the namespace v8::api_internal. None of the previous files in include/ now #include v8.h, which means if embedders were relying on this transitive dependency then it will give compile failures. v8-inspector.h does depend on v8-scripts.h for the time being to ensure that Chrome continue to compile but that change will be reverted once those transitive #includes in chrome are changed to include it directly. Full design: https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing Bug: v8:11965 Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76424}
-
- 11 Jun, 2021 1 commit
-
-
Dan Elphick authored
This removes/replaces header includes with the aim of shrinking the size of the inline header cycle. Specifically before this CL, there was a single Strongly-Connected Component comprising 60 header files from src/objects and src/heap. Now there are two 2 SCCs. The src/heap SCC has 6 files and depends on the src/objects SCC, which has 50 files. Additionally some previously implicit dependencies have been added. Dependencies calculated using: git grep "#include \"" *.h *.cc | sed 's/:#include "/ /;s/".*$//' | \ awk 'BEGIN {print "digraph deps {" } END {print "}"} {print "\""$1"\" -> \""$2"\""}' SCCs found using sccmap from graphviz. Also removes unused Cell::FromValueAddress method. Change-Id: Ib19d00ccd14e490ee64d57be4d99b1b3686ac32a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951734Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75103}
-
- 27 Apr, 2021 1 commit
-
-
Michael Lippautz authored
- Move ASAN and MSAN support to base/ - Eval arguments for builds without sanitizer to preserve same semantics - IWYU fixes Bug: chromium:1056170 Change-Id: I212becf205e03b155c188ffd13cf5629df6f2cb8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2851887Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#74225}
-
- 23 Apr, 2021 1 commit
-
-
Michael Lippautz authored
Untangles the non-tracing GC optimization (Scavenger) that allows for dropping objects that are only reachable from certain API references from EmbedderHeapTracer. Instead, allow setting it on Isolate. This allows for using the optimization when using cppgc. Chromium-side: https://crrev.com/c/2844587 Bug: chromium:1056170 Change-Id: I20f28dd84c808872c7f9559c8c168e828794dd1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844657Reviewed-by:
Omer Katz <omerkatz@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#74135}
-