Commit Graph

79126 Commits

Author SHA1 Message Date
Manos Koukoutos
49b1e977ac [wasm-gc][test] Support recursive groups in wasm-module-builder.js
Bug: v8:7748
Change-Id: Iff6668891ce785ad2f45ff898d92c6ea9b5f4e7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061691
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84534}
2022-11-29 13:33:34 +00:00
Anton Bikineev
e31a7192ee Reland "unified-young-gen: Implement generational barrier for TracedHandles"
The dcheck was fixed in 7b40cb0c1b. The MSVC was also fixed.

Original change's description:
> unified-young-gen: Implement generational barrier for TracedHandles
>
> If unified young generation is enabled, we don't record all young nodes,
> but only ones that have old host. The same std::vector<TracedHandle*> is
> reused for the remembered set implementation.
>
> The barrier is added to TracedHandle creation, i.e.
>  - v8::TracedReference::Reset(),
>  - v8::TracedReference::operator=(const TracedReference&),
> and to moving between TracedHandles, i.e.
>  - v8::TracedReference::operator=(TracedReference&&).
>
> Bug: v8:13475
> Change-Id: I2dc236e21c05f797687344c5745896f0bb8b0a0a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4057070
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84513}

Bug: v8:13475
Change-Id: I8ecde011af077a818b7b96af57e15b607febb185
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061693
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84533}
2022-11-29 13:19:06 +00:00
Dominik Inführ
c8e189946c [heap] Enable marking flag in isolate setup if needed
When creating a new client isolate, incremental marking might be
running in the shared heap. In such cases the incremental marking
flag needs to be enabled right away.

Bug: v8:13267
Change-Id: I8b884ea05f89580db21cbe201e99527d15ae6e03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061325
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84532}
2022-11-29 12:51:44 +00:00
Igor Sheludko
3a946583e2 [sparkplug] Enable concurrent Sparkplug on desktop
Bug: v8:12054
Change-Id: Iffeedc6d33483d86d95169aaf45c214e32c8bc83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061312
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84531}
2022-11-29 12:36:09 +00:00
Thibaud Michaud
e99218a1cc [codegen] Fuzz complex parallel moves
Fuzz parallel moves that may modify the stack layout in
cctest/test-code-generator. This requires some changes in the test
environment to keep track of the the input and output layouts.

R=dmercadier@chromium.org

Bug: chromium:1269989
Change-Id: I872bf5d79b8275595f21fa9236e4634331078053
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4047488
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84530}
2022-11-29 10:58:03 +00:00
Anton Bikineev
c74c73be6f cppgc: Keep |marking_done_| true upon initialization
Since the variable was initialized as |false|, the very first minor gc
triggered a check in TraceEpilogue().

Bug: v8:13475
Change-Id: I8ec574583ec4aa0b97cc1750f8ceea866fbdef7b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061892
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84529}
2022-11-29 10:56:24 +00:00
Omer Katz
8c47ca8dc5 [heap] Fix DCHECK in GCTracer
Bug: v8:12612
Change-Id: I8114898fa9e805c015056892991ffcbb3971e7bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061513
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84528}
2022-11-29 09:56:05 +00:00
Dominik Inführ
234710efd5 [objects] Avoid temporary shared object to local object pointers
Avoid pointers from shared objects to local objects even temporarily
by setting the constructor to null immediately.

Bug: v8:13267
Change-Id: Id5027867f0e1547226399c1308f5d4bfb93a2e90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4058947
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84527}
2022-11-29 09:48:02 +00:00
Tobias Tebbi
f6e9a823ca [compiler][arm64] fix 64/32-bit merging of shifts and binops
It turns out that the previous fix (https://chromium-review.googlesource.com/c/v8/v8/+/3990832)
was insufficient: We should rely on the opcodes themselves, rather
than the kind of constant flowing into the shift.


Bug: chromium:1379738
Change-Id: Ifefbf865cbc1478077798849735a4a836e767312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061709
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84526}
2022-11-29 09:38:11 +00:00
Victor Gomes
211fd627a5 [maglev] Move shared PrintParams
Node printing is architecture agnostic.

Bug: v8:7700
Change-Id: If954c415d4fb7ec82b96eadc8742eb4efc69b290
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061888
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84525}
2022-11-29 09:18:48 +00:00
Nico Hartmann
b49cea5506 [turbofan] Fix incorrect length access on rab/gsab TypedArrays
When TurboFan generates code for TypedArray access for which we have
seen different ElementsKinds, we might end up accessing the TypedArray's
length directly when we are inlining into a call site where the
TypedArray is known. This access could also happen for ElementsKind
cases that are different from the actual TypedArray, which caused a
DCHECK failure for cases where length access is prohibited (e.g. for
rab/gsab backed TAs).
Since these cases are not reachable at runtime, this CL removes the
incorrect length access and generates an Unreachable node in the graph
instead.

Bug: chromium:1393942
Change-Id: I1171531210bf6d1f14a58c4beefb0a3b70a646cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061314
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84524}
2022-11-29 08:34:21 +00:00
v8-ci-autoroll-builder
17b8ea14be Update V8 DEPS (trusted)
Rolling v8/build: cd59f8e..0efbd89

Rolling v8/buildtools: 4a1666e..f2fe6dd

Rolling v8/buildtools/third_party/libc++/trunk: 0488dfb..c2e1032

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/0748984..41982a4

Rolling v8/third_party/depot_tools: 0115386..9a6aa08

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221127.3.1..version:10.20221128.1.1

Rolling v8/tools/clang: 4f8bb52..6846e1e

Change-Id: Icf930ae5e17d27ad0b9306f9e1397073defd095d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4060198
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84523}
2022-11-29 03:51:10 +00:00
Anton Bikineev
7b40cb0c1b unified-young-gen: Fix dcheck test crashes
The Oilpan parallel marker may publish entries into the V8's worklist,
which may cause `DCHECK(worklist->IsEmpty())` to trigger after the
MinorMC parallel marker.

Bug: v8:13475
Change-Id: I5a4c028cd913e99b6d7f57a24133c6ca3f0cae2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061895
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84522}
2022-11-28 20:22:59 +00:00
Juan José Arboleda
18add38e83 src: remove empty folder
The `src/sanitizer` folder is empty after
I212becf205e03b155c188ffd13cf5629df6f2cb8 and
If75674785ca776dac06ed821f0032f865793dd77 changes landed.

Change-Id: I39b880f7a952f481ebae5e6277ffbdd11efb2500
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4057831
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Juan José <soyjuanarbol@gmail.com>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84521}
2022-11-28 16:50:19 +00:00
Seth Brenith
18e1eec3d7 [v8windbg] Fix crash when reading external strings
The debug_helper library is intended to be used from a debugger process
which is attached to the debuggee process that includes V8 content. When
reading memory from the debuggee process, debug_helper should use the
MemoryAccessor function which reads remote memory rather than
dereferencing pointers into the debugger's memory space and potentially
crashing. I recently noticed that v8windbg crashes on external strings
because the sandbox has been enabled, and the debug_helper code for
external strings was incorrectly reading memory from the debugger
process rather than the debuggee.

You might ask: why wasn't this caught in automated tests? There is a
test, cctest/test-debug-helper, which exercises this exact code, but it
does so with the debugger and debuggee in the same process. Setting up a
proper cross-process test would be much more complex and
platform-specific, and this class of bug has never turned up before, so
I think the existing test coverage is adequate.

Change-Id: Ib8730dd47a925f4229962d27b576a759c5a9a9ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4043821
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84520}
2022-11-28 16:13:09 +00:00
Marja Hölttä
18dc5fa50b [rab/gsab] Improve test coverage
1) Parameter conversions resizing the underlying buffer but *not* in a way that would make a length-tracking TA go OOB.

2) Special case of the former: resize to 0.

Bug: v8:11111, chromium:1392577, chromium:1393375
Change-Id: Ia0f54fc4530618fa2313737d6c643abdb24b9a36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055630
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84519}
2022-11-28 15:56:36 +00:00
Victor Gomes
3d5e3704a8 [maglev][arm64] Bailout on unimplemented IR nodes
Bug: v8:7700
Change-Id: I17e538410fa6c93ee1b6d84a47351d21a91e34a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061508
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84518}
2022-11-28 15:49:06 +00:00
Liviu Rau
c76c2787d9 Upload artifacts to resultdb
We change the way we send the output and the ordered flags to resultdb:
 - we create an 'output' artifact to be uploaded end embedded in summary_html
 - we create a 'cmd' artifact that will capture the order of the flags

Example output from local tests:
https://luci-milo.appspot.com/ui/inv/u-liviurau-2022-11-28-12-06-00-b48f44fff8005ccc/test-results?sortby=&groupby=

Bug: v8:13316
Change-Id: Iad4d1bb299c8f2027060a342833585b946f76977
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061309
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#84517}
2022-11-28 15:21:56 +00:00
Matthias Liedtke
617d631f23 Revert "unified-young-gen: Implement generational barrier for TracedHandles"
This reverts commit d164f933b8.

Reason for revert: Failure on YoungUnifiedHeapTest: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20no%20pointer%20compression%20debug/1954/overview (Mac arm64)
Failure on Linux: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20shared/51267/overview

Original change's description:
> unified-young-gen: Implement generational barrier for TracedHandles
>
> If unified young generation is enabled, we don't record all young nodes,
> but only ones that have old host. The same std::vector<TracedHandle*> is
> reused for the remembered set implementation.
>
> The barrier is added to TracedHandle creation, i.e.
>  - v8::TracedReference::Reset(),
>  - v8::TracedReference::operator=(const TracedReference&),
> and to moving between TracedHandles, i.e.
>  - v8::TracedReference::operator=(TracedReference&&).
>
> Bug: v8:13475
> Change-Id: I2dc236e21c05f797687344c5745896f0bb8b0a0a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4057070
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84513}

Bug: v8:13475
Change-Id: I0d97f8cdd0b2e95c7a21b78dacd25c38d08f5a16
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4062087
Owners-Override: Matthias Liedtke <mliedtke@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84516}
2022-11-28 15:20:10 +00:00
Matthias Liedtke
d8f2ebd311 [wasm] Disassembler: Use correct abbreviated names for null types
Bug: v8:7748
Change-Id: I2ba46ad5c70dd5cc08fe41fa6f34e6ae72f0005b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061313
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84515}
2022-11-28 15:04:20 +00:00
Dominik Inführ
aab224cdf6 [heap] Enable --shared-string-table on more fuzzers again
After fixing all known bugs found by fuzzers for
--shared-string-table we can enable this flag on all fuzzers again.

Bug: v8:13267
Change-Id: Ie2c361bbd2cf349d2c5d517fb6c71f88a3381626
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061310
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84514}
2022-11-28 14:38:29 +00:00
Anton Bikineev
d164f933b8 unified-young-gen: Implement generational barrier for TracedHandles
If unified young generation is enabled, we don't record all young nodes,
but only ones that have old host. The same std::vector<TracedHandle*> is
reused for the remembered set implementation.

The barrier is added to TracedHandle creation, i.e.
 - v8::TracedReference::Reset(),
 - v8::TracedReference::operator=(const TracedReference&),
and to moving between TracedHandles, i.e.
 - v8::TracedReference::operator=(TracedReference&&).

Bug: v8:13475
Change-Id: I2dc236e21c05f797687344c5745896f0bb8b0a0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4057070
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84513}
2022-11-28 14:29:39 +00:00
Igor Sheludko
7317006be8 [csa][builtins-pgo] Make builtins architecture-independent, pt. 2
This CL moves the architecture-dependent IsFloat64RoundXXXSupported()
checks from C++ code to CSA graph in order to ensure that the builtins
control flow structure is architecture-independent.

Since the constant value is known at compile-time TurboFan will remove
the check and delete the dead code so in the end the generated code
will be the same and when the check was on C++ side.

However, having these checks in the CSA graph keeps the initial state
of graph structure the same for all architectures of the same bitness.
This allows reusing the x64/x86 builtins PGO profiles on arm64/arm
builds respectively.

Bug: v8:10470
Change-Id: Ib3ddf2bf2bb7001b28d4477cc490495f3be79d98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055924
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84512}
2022-11-28 14:10:49 +00:00
Al Muthanna Athamina
9b22eed4ed Adding crash data analysis with dummy values
Adding the crash status and type to the test result with dummy values,
with the intention of populating these values with data from
ClusterFuzz analyzer or our own logic.

Bug: v8:12313
Change-Id: I8a537734a9c48393b77d582516ae45638986aa55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4047486
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84511}
2022-11-28 14:05:29 +00:00
Leszek Swirski
dbdf3f17f4 [maglev] Move verification code to maglev-ir.cc
Keep NodeT verification code closer to the reset of the NodeT
implementation by making input verification a function on NodeT rather
than being implemented in a separate verifier.

This function has a default implementation for fixed-input nodes, which
just looks up a static input types array (with CRTP) on the derive
node.

As a drive-by, change the fixed-size node base classes to share a mixin
base class, to avoid duplicating the verification logic.

Bug: v8:7700
Change-Id: Ib9dd7dba540f16fa359b170d513f20aa0e110e24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026343
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84510}
2022-11-28 14:03:29 +00:00
Andreas Haas
6160fe9f40 [wasm][debug] Do lazy compilation after leaving debugging
Currently V8 recompiles all functions of a WebAssembly module with
TurboFan when a debugging session ends. This is outdated behavior and
causes OOMs for developers. With this CL all debugging code gets removed
when a debugging session ends, and functions get re-compiled lazily.

This behavior may lead to slightly worse performance for some time after
debugging finishes, but it avoids OOMs, and developers are used to
debugging code being not as performant as production code.

R=clemensb@chromium.org

Bug: chromium:1372621, v8:13224
Change-Id: I9fc97408ef92ad5564f2a9743213762226c2b25e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055923
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84509}
2022-11-28 13:46:09 +00:00
Samuel Groß
852aa1865f [sandbox] Do not trigger GC during EPT entry allocation
This simplifies some call sites as they do not need to worry about
stores to external pointer fields (especially lazily initialized ones)
triggering GCs. This also keeps the sandbox and non-sandbox mode more
consistent, as these stores will never trigger GC in non-sandbox builds.
Since there must be millions of objects that own the external pointer
table entries, the chances are quite high that GCs will anyway be
scheduled. If not, we should instead see if we can introduce an API
to only schedule incremental marking but not perform GC finalization.

Bug: v8:13535
Change-Id: Ie3c82b51194746107d4b0ed61d47abf87d28ba63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061688
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84508}
2022-11-28 13:38:49 +00:00
Dominik Inführ
6669b5aea4 [objects] Pass isolate to SeqString::Truncate
With shared strings we can't get the isolate/heap from the heap object
itself, so we need to pass this as additional argument instead.
Luckily enough all callers already know the current isolate.

Bug: v8:13267, chromium:1392755
Change-Id: I7c40f7a38da8ad57fcdaa575451b8f5ac2272b1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4059026
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84507}
2022-11-28 13:20:49 +00:00
Samuel Groß
9c61d04fa3 Remove incorrect DCHECKs in VirtualMemory functions
Performing actions such as changing page permissions can fail under
memory pressure, as such, these DCHECKs can sometimes trigger and should
be removed. Instead, this CL adds V8_WARN_UNUSED_RESULT to these APIs to
ensure that callers check the return value.

Bug: chromium:1382075
Change-Id: I678d3fb41ee465feda7d677678d3462dbc4c5940
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4031633
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84506}
2022-11-28 12:14:28 +00:00
Liu Yu
d8e2a28509 [mips64] Fix a typo
One of the kMips64MulOvf should be kMips64DMulOvf.

Change-Id: Ie333da46b443513c58d78bc092a3245ce612efbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061106
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#84505}
2022-11-28 07:51:58 +00:00
v8-ci-autoroll-builder
852ae98a1b Update V8 DEPS (trusted)
Rolling v8/build: 3542a5d..cd59f8e

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221126.2.1..version:10.20221127.3.1

Change-Id: Icfb8739468d50f7e2487b66ecae16b25e7a13cc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4060048
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84504}
2022-11-28 04:06:18 +00:00
v8-ci-autoroll-builder
59187809cb Update V8 DEPS (trusted)
Rolling v8/build: abd061c..3542a5d

Rolling v8/buildtools: 8641823..4a1666e

Rolling v8/buildtools/third_party/libc++/trunk: 8a91ae4..0488dfb

Rolling v8/buildtools/third_party/libc++abi/trunk: 83cce21..7362046

Rolling v8/third_party/depot_tools: 73a2624..0115386

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221123.1.1..version:10.20221126.2.1

Change-Id: Ib645e3757a280b9ffbd542b428560f7734a05520
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4058468
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84503}
2022-11-27 04:20:57 +00:00
Milad Fa
515e863e4f Check for INT64_MIN / -1 under SignedMulOverflow64
Bug: chromium:1392928, v8:9407
Change-Id: I0cf75d27a8e2db74f735c32461c02dbab098590d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4058066
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84502}
2022-11-26 17:13:27 +00:00
v8-ci-autoroll-builder
7d61e9aaa5 Update V8 DEPS (trusted)
Rolling v8/build: f57e5d4..abd061c

Rolling v8/buildtools: 9ca2fd2..8641823

Rolling v8/buildtools/reclient: re_client_version:0.86.0.25feac0-gomaip..re_client_version:0.87.0.b6908b3-gomaip

Rolling v8/buildtools/third_party/libc++/trunk: cd0a050..8a91ae4

Change-Id: I8054b163726a119cbaaa0472b1d2374649daa68b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4057830
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84501}
2022-11-26 04:19:47 +00:00
pthier
eaf033132a [heap] Enable string shortcutting with stack per default
Disabling string shortcutting during GCs with stack caused regressions
(mainly on RegExp and typescript benchmarks).
Enable shortcutting per default (again).

Bug: chromium:1393572
Change-Id: Idcf7f3f6e74263a94d9303c93b66c7ed4e20a9cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055272
Auto-Submit: Patrick Thier <pthier@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84500}
2022-11-25 21:07:08 +00:00
Omer Katz
b1f450a1a6 [heap] Run unittests for MinorMC variant
Bug: v8:12612
Change-Id: I02bf23916e1fb7ae07197310158ae3777b84f20f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056257
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84499}
2022-11-25 19:47:56 +00:00
Victor Gomes
3a13bc5596 [maglev] Arm64 boilerplate
The absolute minimum to compile arm64 with v8_enable_maglev.

Bug: v8:7700
Change-Id: I7e1a0e31397f1677977c416d0ecc68fd6ee35b12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055115
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84498}
2022-11-25 16:13:36 +00:00
Igor Sheludko
7216ab0c08 [csa][builtins-pgo] Make builtins architecture-independent, pt. 1
This CL moves the architecture-dependent Word32ShiftIsSafe() check
from C++ code to CSA graph in order to ensure that the builtins control
flow structure is architecture-independent.

Since the constant value is known at compile-time TurboFan will remove
the check and delete the dead code so in the end the generated code
will be the same and when the check was on C++ side.

However, having these checks in the CSA graph keeps the initial state
of graph structure the same for all architectures of the same bitness.
This allows reusing the x64/x86 builtins PGO profiles on arm64/arm
builds respectively.

Bug: v8:10470
Change-Id: I5a7a10dfbf905e542d14f05193ff3b3990288b87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055606
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84497}
2022-11-25 16:12:33 +00:00
Darius M
db437000b1 [turboshaft] re-enable BranchElimination
Now that 1618cb9f99
has landed, BranchElimination should work again.

Bug: v8:12783
Change-Id: I6c1f148d1ce97a45107bfed2da41b387ad9bf1ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055113
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84496}
2022-11-25 16:01:20 +00:00
Qifan Pan
2301870e75 [turboshaft] Implement SignedMulOverflow64
This CL implements SignedMulOverflow64 to enable constant folding
of 64-bit SignedMul in machine optimization reducer.

Bug: chromium:1392928, v8:9407
Change-Id: I3a46198b2e2a0b59ca33f5a333fb8ea3d8f89340
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055684
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84495}
2022-11-25 15:44:06 +00:00
Samuel Groß
eacdc876e9 [sandbox] Remove v8_enable_sandbox_future
As this is by now equivalent to v8_enable_sandbox.

Bug: v8:10391
Change-Id: I1eef40a86b984a1867de3513a108ece0d43ec394
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055273
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84494}
2022-11-25 15:12:23 +00:00
Milad Fa
9ec8dd6b8b PPC[liftoff]: Implement simd FP<->Int conversions
Change-Id: Iefcadb2ee186d5bf2aca6c5e05adcedcacd74e2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053378
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84493}
2022-11-25 14:39:05 +00:00
Victor Gomes
05b46168fa [maglev] Add Float64Modulus
Bug: v8:7700
Change-Id: I2b33732872152d9ba913ba7a9ed9f7f20ef17e66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055464
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84492}
2022-11-25 14:32:55 +00:00
Milad Fa
9231d9eebb PPC[was]: skip max-wasm-functions.js
PPC has a smaller wasm code space compared to other platforms and
as a result can't execute modules with large number of functions.

More details are available under the comment section of
crrev.com/c/4027963

Change-Id: I0531ec855ee9ffa5542bf0527287a3e49e1cdb0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053377
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84491}
2022-11-25 13:41:18 +00:00
Victor Gomes
7b33cc5d80 [maglev] Move x64 specific code
Bug: v8:7700
Change-Id: Ifed534a2fa5cd53955aa9bf126d31c79d4d6b9da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055110
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84490}
2022-11-25 13:21:25 +00:00
Marja Hölttä
9010d09a05 [rab/gsab] Fix TA.p.lastIndexOf + evil resize to 0
Evil resizes were tested. Evil resizes to 0 were not.

Bug: v8:11111,chromium:1393375
Change-Id: Ie7318ae300d9779664d97e61214fed61f061f36d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053554
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84489}
2022-11-25 13:04:15 +00:00
Dominik Inführ
2507b38af2 [heap] Update SharedStringInClientGlobalHandle test for --shared-space
This test had to be updated for --shared-space because the main isolate
is always parked when the client isolate requests a GC. In such cases
the GC isn't performed and therefore the weak handle not reset.

The CL moves the client isolate into a proper thread which allows the
main isolate to remain in the running state.

In addition this CL adds the BasicMemoryChunk::ComputeMarkBit
methods. These methods make it easy during debugging to compute
the MarkBit (cell + mask) for an object.

Bug: v8:13267
Change-Id: I6680d8d1d8b36d86b22c43399abbd4325f64ccb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4054622
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84488}
2022-11-25 12:41:35 +00:00
Victor Gomes
c970d03449 [maglev] Add unary IEEE Math builtin functions
Bug: v8:7700
Change-Id: I7225f252ae753d7f51a8b4a33f01819dad15cdba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056875
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84487}
2022-11-25 12:35:15 +00:00
Darius M
1618cb9f99 [turboshaft] Refactor Call and multi-output handling in GraphBuilder
Bug: v8:12783
Change-Id: I0f7896259f0c1344b0a1d9583093de7bec930a77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4044221
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84486}
2022-11-25 12:14:25 +00:00
Matthias Liedtke
d2305bebcd [wami] Print '<bot>' for invalid negative heap types
This is consistent with the bottom value type.

Bug: v8:13525
Change-Id: Ib413c67a3b79b27280e2ea6b8ba3d48d3786cdf8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4053553
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84485}
2022-11-25 12:08:35 +00:00