- 18 Feb, 2022 1 commit
-
-
Samuel Groß authored
Previously, V8_OS_MACOSX was, somewhat confusingly, also used for iOS. With this CL, V8_OS_DARWIN will be set on both macOS and iOS, V8_OS_MACOS only on macOS, and V8_OS_IOS only on iOS. This CL also renames V8_TARGET_OS_MACOSX to V8_TARGET_OS_MACOS and renames platform-xnu.cc to platform-darwin.cc. Change-Id: I4bcafc7c337586662114144f6c7ccf47d978da1f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468577Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#79167}
-
- 20 Jan, 2022 1 commit
-
-
Samuel Groß authored
The external pointer table is now managed by the GC, which marks entries that are alive during major GC, then sweeps the table afterwards to free all dead entries and build a free list from them. For now, only major GCs are supported, Scavenger GCs do not interact with the external pointer table. In more detail, garbage collection of the external pointer table works as follows: 1. The external pointer table now reserves a large region of virtual address space for its backing buffer and is then never reallocated, only grown in place until the maximum size is reached. 2. When the GC's marking visitor marks a HeapObject with an external pointer as alive, it also marks the corresponding external pointer table entry as alive. This can happen on a background thread. 3. For that, it uses the MSB of each entry in the table to indicate whether the entry has been marked or not. This works because the MSB is always cleared during the AND-based type check performed when accessing an external pointer. 4. After marking, the external pointer table is swept while the mutator is stopped. This builds an inline, singly-linked freelist of all newly-dead and previously-free entries. 5. When allocating an entry from the table, the first entry on the freelist is used. If the freelist is empty, the table grows, populating the freelist with the new entries. 6. Every newly-allocated entry is marked as alive, and every store to an existing entry also automatically marks that entry as alive (by also setting the MSB). This simplifies the design of the table GC with regards to concurrency (See ExternalPointerTable::Mark). Bug: v8:10391 Change-Id: I8877fdf5576af3761bde65298951bb09e601bd14 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/+/3359625Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#78708}
-
- 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}
-
- 01 Dec, 2021 1 commit
-
-
Adam Klein authored
MSVC doesn't define __cplusplus appropriately, so use _MSVC_LANG instead. Bug: chromium:1274247 Change-Id: I40ef9f42f4e55b3410f89ff23c228f1b1201c4ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308423 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Adam Klein <adamk@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#78180}
-
- 30 Nov, 2021 1 commit
-
-
Leszek Swirski authored
It's deprecated in C++17 and not needed (it was needed for static const, but not for constexpr). It's needed in C++14, but can trigger deprecation errors in C++17, so include it conditionally on __cplusplus. Bug: chromium:1274247 Change-Id: I92524f377bb92ac2aa008f15830920786a1c1432 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308795 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#78157}
-
- 22 Nov, 2021 2 commits
-
-
Nico Hartmann authored
This reverts commit d7c3f1cd. Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Android%20Arm64%20-%20debug%20builder/22043/overview Original change's description: > Reland "[fastcall] Enable float support on arm64 simulator" > > This is a reland of b9ddcbc8 > > The original CL was reverted due to an MSAN issue, that is fixed by > moving the signature mapping onto the Isolate (instead of having > per-thread storage, which got invalid on multithreaded compilation). > > This CL also contains fixes for the Bazel config and for a data race > when obtaining the PerIsolateSimulatorData. > > Original change's description: > > [fastcall] Enable float support on arm64 simulator > > > > This CL adds support for handling calls to C functions with arbitrary > > signatures on the arm64 simulator. It adds infrastructure for > > encoding the signature data from CallDescriptor and FunctionInfo > > classes into a compact representation, stored in the simulator and > > called EncodedCSignature. > > > > Design doc: > > https://docs.google.com/document/d/1ZxOF3GSyNmtU0C0YJvrsydPJj35W_tTJZymeXwfDxoI/edit > > > > This CL is a follow up on the native support added in > > https://chromium-review.googlesource.com/c/v8/v8/+/3182232 > > and is partially based on the previous attempt: > > https://chromium-review.googlesource.com/c/v8/v8/+/2343072 > > > > Bug: chromium:1052746 > > Change-Id: I0991b47bd644b2fc2244c5eb923b085261f04765 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060486 > > Commit-Queue: Maya Lekova <mslekova@chromium.org> > > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > > Cr-Commit-Position: refs/heads/main@{#77744} > > Bug: chromium:1052746, chromium:1267854 > Change-Id: I89bbd01e33fb1080543d98bcfd4c2d17b5c76861 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270541 > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Commit-Queue: Maya Lekova <mslekova@chromium.org> > Cr-Commit-Position: refs/heads/main@{#78018} Bug: chromium:1052746, chromium:1267854 Change-Id: Ia8f10d085d13990b331f306957f95ecf3e003cfd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295453 Owners-Override: Nico Hartmann <nicohartmann@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#78019}
-
Maya Lekova authored
This is a reland of b9ddcbc8 The original CL was reverted due to an MSAN issue, that is fixed by moving the signature mapping onto the Isolate (instead of having per-thread storage, which got invalid on multithreaded compilation). This CL also contains fixes for the Bazel config and for a data race when obtaining the PerIsolateSimulatorData. Original change's description: > [fastcall] Enable float support on arm64 simulator > > This CL adds support for handling calls to C functions with arbitrary > signatures on the arm64 simulator. It adds infrastructure for > encoding the signature data from CallDescriptor and FunctionInfo > classes into a compact representation, stored in the simulator and > called EncodedCSignature. > > Design doc: > https://docs.google.com/document/d/1ZxOF3GSyNmtU0C0YJvrsydPJj35W_tTJZymeXwfDxoI/edit > > This CL is a follow up on the native support added in > https://chromium-review.googlesource.com/c/v8/v8/+/3182232 > and is partially based on the previous attempt: > https://chromium-review.googlesource.com/c/v8/v8/+/2343072 > > Bug: chromium:1052746 > Change-Id: I0991b47bd644b2fc2244c5eb923b085261f04765 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060486 > Commit-Queue: Maya Lekova <mslekova@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77744} Bug: chromium:1052746, chromium:1267854 Change-Id: I89bbd01e33fb1080543d98bcfd4c2d17b5c76861 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270541Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/main@{#78018}
-
- 08 Nov, 2021 1 commit
-
-
Jakob Gruber authored
This CL adds an Allocator to SmallVector to control how dynamic storage is managed. The default value uses the plain old C++ std::allocator<T>, i.e. acts like malloc/free. For use with zone memory, one can pass a ZoneAllocator as follows: // Allocates in zone memory. base::SmallVector<int, kInitialSize, ZoneAllocator<int>> xs(ZoneAllocator<int>(zone)); Note: this is a follow-up to crrev.com/c/3240823. Drive-by: hide the internal `reset` function. It doesn't free the dynamic backing store; that's a surprise and should not be exposed to external use. Change-Id: I1f92f184924541e2269493fb52c30f2fdec032be Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3257711 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#77755}
-
- 29 Oct, 2021 1 commit
-
-
Samuel Groß authored
A CagedPointer is guaranteed to point into the Virtual Memory Cage and will for example be used for ArrayBuffer backing stores when the heap sandbox is enabled. In the current implementation, CagedPointers are stored as offsets from the cage base, shifted to the left. Because the cage base address is usually available in a register, accessing a CagedPointer is very efficient, requiring only an additional shift and add operation. Bug: chromium:1218005 Change-Id: Ifc8c088e3862400672051a8c52840514dee2911f 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/+/3123417Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#77614}
-
- 13 Oct, 2021 1 commit
-
-
Samuel Groß authored
This is a reland of 1ea76c13 Disabled the failing test on Fuchsia until its PageAllocator respects allocation hints. Original change's description: > Implement a fake virtual memory cage mechanism > > On operating systems where reserving virtual address space is expensive, > notably Windows pre 8.1, it is not possible to create a proper virtual > memory cage. In order to still be able to reference caged objects > through offsets from the cage base on these systems, this CL introduces > a fake cage mechanism. When the fake cage is used, most of the virtual > memory for the cage is not actually reserved. Instead, the cage's page > allocator simply relies on hints to the OS to obtain pages inside the > cage. This does, however, not provide the same security benefits as a > real cage as unrelated allocations might end up inside the cage. > > Bug: chromium:1218005 > Change-Id: Ie5314be23966ed0042a017917b63595481b5e7e3 > 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/+/3217200 > Commit-Queue: Samuel Groß <saelo@chromium.org> > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Reviewed-by: Toon Verwaest <verwaest@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77367} Bug: chromium:1218005 Change-Id: I2ed95d121db164679c38085115e8fa92690c057e 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/+/3220151Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#77378}
-
- 12 Oct, 2021 2 commits
-
-
Deepti Gandluri authored
This reverts commit 1ea76c13. Reason for revert: The unit test added fails on the Fuchsia bot https://ci.chromium.org/p/v8/builders/ci/V8%20Fuchsia/25976? Original change's description: > Implement a fake virtual memory cage mechanism > > On operating systems where reserving virtual address space is expensive, > notably Windows pre 8.1, it is not possible to create a proper virtual > memory cage. In order to still be able to reference caged objects > through offsets from the cage base on these systems, this CL introduces > a fake cage mechanism. When the fake cage is used, most of the virtual > memory for the cage is not actually reserved. Instead, the cage's page > allocator simply relies on hints to the OS to obtain pages inside the > cage. This does, however, not provide the same security benefits as a > real cage as unrelated allocations might end up inside the cage. > > Bug: chromium:1218005 > Change-Id: Ie5314be23966ed0042a017917b63595481b5e7e3 > 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/+/3217200 > Commit-Queue: Samuel Groß <saelo@chromium.org> > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Reviewed-by: Toon Verwaest <verwaest@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77367} Bug: chromium:1218005 Change-Id: I541bb9656ab2a6a080c2a30d372226fcc5c95391 Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3219086 Auto-Submit: Deepti Gandluri <gdeepti@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Deepti Gandluri <gdeepti@chromium.org> Owners-Override: Deepti Gandluri <gdeepti@chromium.org> Cr-Commit-Position: refs/heads/main@{#77368}
-
Samuel Groß authored
On operating systems where reserving virtual address space is expensive, notably Windows pre 8.1, it is not possible to create a proper virtual memory cage. In order to still be able to reference caged objects through offsets from the cage base on these systems, this CL introduces a fake cage mechanism. When the fake cage is used, most of the virtual memory for the cage is not actually reserved. Instead, the cage's page allocator simply relies on hints to the OS to obtain pages inside the cage. This does, however, not provide the same security benefits as a real cage as unrelated allocations might end up inside the cage. Bug: chromium:1218005 Change-Id: Ie5314be23966ed0042a017917b63595481b5e7e3 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/+/3217200 Commit-Queue: Samuel Groß <saelo@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#77367}
-
- 10 Aug, 2021 1 commit
-
-
Clemens Backes authored
This cannot be defined in v8config.h because target architecture detection is not done in that file. This CL moves the logic to set V8_HAS_PTHREAD_JIT_WRITE_PROTECT to src/base/build_config.h, which also defines the V8_TARGET_ARCH* macros. R=jkummerow@chromium.org, mlippautz@chromium.org Bug: chromium:1238029 Change-Id: I2a688dad32b83df1d26bf23b15bf4485d78c8cc6 Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3085271 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#76198}
-
- 06 Aug, 2021 1 commit
-
-
Clemens Backes authored
pthread_jit_write_protect* functions are only available on arm64 Mac, not on iOS (which also sets V8_{TARGET_,}OS_MACOSX). This CL refactors the logic to detect whether pthread_jit_write_protect and MAP_JIT are available and defines a global preprocessor macro which can subsequently be used instead of the existing complex condition. R=jkummerow@chromium.org, mlippautz@chromium.org Change-Id: I63894f42df35406d6eee90a4ce5070c2fde7b566 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3077154Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Auto-Submit: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#76143}
-
- 02 Aug, 2021 1 commit
-
-
Camillo Bruni authored
- Add V8_OS_STRING and V8_TARGET_OS_STRING define - Add v8-platform logging event - Add shared-library-end event for faster v8.log processing Change-Id: Id25a9e704620dbb70042e51a1fb6ed77ca7256bb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067219Reviewed-by: Patrick Thier <pthier@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#76040}
-
- 02 Jul, 2021 2 commits
-
-
Zhi An Ng authored
This reverts commit 92bfb63c. Reason for revert: Broke build https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20shared/43249/overview Original change's description: > [build] Separate out inspector as a shared library > > This makes src/inspector:inspector into a v8_component producing a > shared library in component builds. To enable this, all of its exported > are now marked with V8_INSPECTOR_EXPORT. > > This also inverts the dependency between src/inspector:inspector and > :v8_base_without_compiler, and instead makes d8 and some tests depend on > inspector rather than getting it via v8. > > As a result, the no_check_targets exclusions list in .gn is reduced. > > Ultimately embedders like chromium should depend on :v8 and optionally > src/inspector:inspector, but to allow that transition to occur, this > renames :v8 to :v8_lib and introduces a new :v8 which depends on v8 and > inspector. Once all embedders have changed to reflect the new structure, > this part can be reverted. > > Bug: v8:11917 > Change-Id: Ia8b15f07fb15acc5e1f111b1a80248def4285fd0 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999088 > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Michael Achenbach <machenbach@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75532} Bug: v8:11917 Change-Id: I0ed27ed95211d13b8b3438a8c0a42d577806c475 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3003452 Auto-Submit: Zhi An Ng <zhin@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#75533}
-
Dan Elphick authored
This makes src/inspector:inspector into a v8_component producing a shared library in component builds. To enable this, all of its exported are now marked with V8_INSPECTOR_EXPORT. This also inverts the dependency between src/inspector:inspector and :v8_base_without_compiler, and instead makes d8 and some tests depend on inspector rather than getting it via v8. As a result, the no_check_targets exclusions list in .gn is reduced. Ultimately embedders like chromium should depend on :v8 and optionally src/inspector:inspector, but to allow that transition to occur, this renames :v8 to :v8_lib and introduces a new :v8 which depends on v8 and inspector. Once all embedders have changed to reflect the new structure, this part can be reverted. Bug: v8:11917 Change-Id: Ia8b15f07fb15acc5e1f111b1a80248def4285fd0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999088Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75532}
-
- 10 May, 2021 1 commit
-
-
Clemens Backes authored
After updating our bots to use GCC 7.4, we do not need to support incomplete C++14 support any more. In particular, we can assume complete c++14 constexpr support now. This CL removes the V8_HAS_CXX14_CONSTEXPR and CONSTEXPR_DCHECK macros. The CONSTEXPR_DCHECKs are replaced by DCHECK and friend, or STATIC_ASSERT where possible. R=jgruber@chromium.org, leszeks@chromium.org, mlippautz@chromium.org Bug: v8:9686, v8:11384 Change-Id: I3a8769a0f54da7eb2cacc37ee23e5c97092e3051 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876847Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74486}
-
- 28 Apr, 2021 1 commit
-
-
Michael Lippautz authored
GCC 7.4 has problems with combining [[nodiscard]] with __attribute__((visibility(""))). Disable as there's enough compilation coverage for clang to find issues. Bug: v8:11707 Change-Id: I9e61463c4d11dbc3b03d458e2810206fb93de108 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2854737Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#74262}
-
- 18 Jan, 2021 1 commit
-
-
Dan Elphick authored
Adds a v8-gn.h file containing defines that are used in the externally-visible headers files like v8.h. This must be included by include/v8config.h which includes it if the GN flag v8_generate_external_defines_header is on. (Currently off by default). To enable the v8config.h file to be included without the other v8 headers (as required by cppgc), this moves it into its own header set which sets up the include path correctly. Also updates some headers to ensure v8config.h is included before using externally-visible defines. Bug: v8:11292 Change-Id: I5be634f4adfbef144bf684071461d64f1cb30899 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2608212 Commit-Queue: Dan Elphick <delphick@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#72140}
-
- 25 Nov, 2020 1 commit
-
-
Santiago Aboy Solanes authored
This allows us to assert at compile time that a class instance is assigned, which is particularly useful for Guard classes. Change-Id: Id16b2bb70d29573566e821c908c1169d49ec57af Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2552415 Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#71397}
-
- 20 Oct, 2020 1 commit
-
-
Maya Lekova authored
Switch the current bool* parameter to a structure that contains the boolean fallback flag and is forward compatible, if we decide to add more options to the fallback call. Fly-by refactoring: moved V8_ENABLE_FP_PARAMS_IN_C_LINKAGE out of a public V8 header file. Bug: chromium:1052746 Change-Id: I844db24cc687c58b3c3bbd84b4d61bb4759bcfc7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2474775 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#70642}
-
- 28 Sep, 2020 1 commit
-
-
Maya Lekova authored
This CL also adds some unit tests, locally tested under x64. The double support is based on this original CL by Gus Caplan (snek@chromium.org): https://chromium-review.googlesource.com/c/v8/v8/+/2264612 Bug: chromium:1052746 Change-Id: Ibdf631689b01ab619a72005226bfc015b4737dde Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416028Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Auto-Submit: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#70168}
-
- 24 Aug, 2020 1 commit
-
-
johnx authored
Starboard is the platform abstraction for Cobalt. This CL introduces all Cobalt changes in src/base/platform. The review was conducted mostly on: https://chromium-review.googlesource.com/c/v8/v8/+/2247918 See b/156155426 for background Tbr: mlippautz@chromium.org Change-Id: I6cd092304ba6485acd38e82aa2dc4505d7dfb0aa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2346090 Commit-Queue: John Xu <johnx@google.com> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69530}
-
- 19 Jun, 2020 1 commit
-
-
Michael Lippautz authored
This is a reland of e0c1a349 The issue was passing SentinelPointer (== +1) through T*. The fix is disabling cfi unrelated cast diagnostic for the bottlenecks (Get()). This means that nullptr is treated the same as kSentinelPointer. The alternative would be a DCHECK that Get() does not return kSentinelPointer and adjusting all Member and Persistent logic that uses Get() to work on void*. This is quite intrusive as it involves Swap(), heterogeneous assignments, comparisons, etc. Original change's description: > cppgc: Properly clear (Weak)Peristent and WeakMember pointers > > The CL addresses two issues with (Weak)Persistent and WeakMember: > 1. (Weak)Persistent pointers are cleared on heap teardown. Before this > CL the pointers would contain stale values which could lead to UAF. > 2. WeakPersistent and WeakMember are cleared using a combination of > internal clearing methods and mutable fields which avoids the use > of const_cast<>. > > Bug: chromium:1056170 > Change-Id: Ibf2b0f0856771b4f6906608cde13a6d43ebf81f3 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2248190 > Reviewed-by: Omer Katz <omerkatz@chromium.org> > Reviewed-by: Anton Bikineev <bikineev@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68394} Bug: chromium:1056170 Change-Id: I3d74b43464c2973df1956f51b1419d755dd9f519 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250240Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#68426}
-
- 12 May, 2020 1 commit
-
-
Omer Katz authored
This CL adds 2 new values to the EmbedderStackState enum with more explicit names. The old values are updated as aliases to the new values and marked as soon to be deprecated. This CL also moves the enum to v8-platform.h so that it can be reused by cppgc. Depracating individual values in an enum is supported by GCC only since version 6. Thus new macros were needed for the deprecation (which delegate to the existing macros when supported). GCC versions older than 6 are still used by the CQ bots. Bug: chromium:1056170 Change-Id: Id1ea73edfbbae282b0d8a3bb103dbbbf8ebd417e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2188971 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#67744}
-
- 14 Jan, 2020 1 commit
-
-
Michael Lippautz authored
- Introduces a API to set top of the stack through EmbedderHeapTracer::SetStackTop. - Introduces a new API to inform V8 about an empty embedder stack. - Switch internal representation of TracedReference for on-stack handles to a proper stack that considers all contained handles as roots. - Handle garbage is avoided by cleaning up on handle creation or GC. Design doc: https://bit.ly/on-stack-traced-reference Bug: chromium:1040038 Change-Id: I927ef0abb268fdb5853c9e17b1bc96e2491cf101 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993973 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#65757}
-
- 21 Oct, 2019 1 commit
-
-
Clemens Backes authored
We still set a lot of macros depending on specific gcc versions. All these old versions are unsupported by now anyways, so we can also just define these macros as 1. If this CL sticks for a while, we can start actually cleaning up all code relying on these macros, as most of them should be 1 now on all platforms. R=ulan@chromium.org Bug: v8:9810 Change-Id: I2f9c55170091f8c263deeddfb7ff89e5b2a0bb12 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1862564Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#64413}
-
- 16 Oct, 2019 1 commit
-
-
Clemens Backes authored
DCHECKs are not really special, they just create a non-constexpr path within an otherwise constexpr function. Since C++14, this is allowed. Unfortunately, gcc only supports this since version 6, but we still need to support gcc 5. R=ulan@chromium.org Change-Id: If74486144abafa5bbdcdbb9a567ee9295ac4cfc7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1862568Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#64310}
-
- 09 Oct, 2019 3 commits
-
-
Igor Sheludko authored
Bug: v8:7703 Change-Id: If8605f4dc4ab50fb5a95b43994262c8f3edd92a7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1849524Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#64192}
-
Clemens Backes authored
The V8_HAS_DECLSPEC_NORETURN macro is unused since https://crrev.com/c/529072, where we switched to the standard [[noreturn]] attribute. R=ulan@chromium.org Bug: v8:9810 Change-Id: Ifd76c967df1da7bb71369e61cd0adc1807b62d44 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847365Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#64175}
-
Clemens Backes authored
Since C++14, there is a spec'ed attribute for deprecation of methods, functions, types, aliases or anything else. This CL switches from the GCC __attribute__ to this standard attribute. This allows to use the V8_DEPRECATED and V8_DEPRECATE_SOON macros on anything where the standard attribute can be used (including {using} statements that were not working before). It also avoids the need to nest the whole declaration in the macro, making the code more readable. R=adamk@chromium.org Bug: v8:9810 Change-Id: I7adab7694af75423fb31ade2fc982dbf9c9bc699 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847361Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#64174}
-
- 19 Sep, 2019 1 commit
-
-
Jakob Gruber authored
This CL allows us to distinguish between the host- and target OS. The host OS is defined by V8_OS_ macros (e.g. V8_OS_WIN). The target OS is defined by V8_TARGET_OS_ macros (e.g. V8_TARGET_OS_WIN). V8_TARGET_OS_ macros are defined by gn, based on the `target_os` gn variable. If a V8_TARGET_OS_ is set, we also define V8_HAVE_TARGET_OS (this determines fall-back behavior in V8; if it is not defined, we set V8_TARGET_OS_ to equal the equivalent V8_OS_ define). Besides adding the defines, this CL also adds logic to consider the target OS in codegen. Specifically, x64 builds now look at the V8_TARGET_OS_WIN define instead of V8_OS_WIN or _WIN64. This effectively makes cross-compilation to x64 Windows in mksnapshot possible. In future work, we could add similar support for cross-compiling to other platforms such as ia32 Windows. Bug: v8:9736,chromium:803591 Change-Id: I689f3de8c206b743c4bef703f5ade0bba32ce995 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809374Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#63892}
-
- 18 Sep, 2019 1 commit
-
-
Clemens Hammacher authored
This is an unmodified reland of 60624b56. Nosnap bots do not block LKGR any more: https://crbug.com/v8/9737#c10. Original change's description: > Disallow nullptr arguments for {CopyChars} > > This allows to remove special casing for the {count == 0} case, which > was needed because {memmove} does not accept {nullptr} arguments even > if the {count} is zero. > > R=leszeks@chromium.org > > Bug: v8:9396 > Change-Id: Iaef3cdbbffa74c2ba1c4e4501dafd943282cbcd9 > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807366 > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63838} TBR=leszeks@chromium.org Bug: v8:9396 Change-Id: I6ab13575f13df060b450ff105e4b9db516671dcf Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809365Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#63863}
-
- 17 Sep, 2019 2 commits
-
-
Adam Klein authored
This reverts commits 9febc505 (along with followup commit 60624b56). Reason for revert: Breaks win32 nosnap shared, blocking lkgr & roll: https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20nosnap%20-%20shared/35145 nosnap bots may be deprecated, but as long as they're in LKGR we need to mind them. Original change's description: > Reland "Remove all custom CopyCharsUnsigned implementations" > > This is a reland of 5d8c4890 > > Original change's description: > > Remove all custom CopyCharsUnsigned implementations > > > > It's unclear whether the custom implementation have any advantage over > > the standard library one's. > > Since we update our toolchain and standard library regularly, it might > > well be the case that the custom implementations are slower by now. > > > > Thus this CL removes all {CopyCharsUnsigned} implementations and > > implements {CopyChars} generically using {std::copy_n}. > > > > Note that this does not touch the {MemMove} and {MemCopy} functions > > yet, as we have seen regressions when trying to remove them before > > (https://crbug.com/v8/8675#c5). > > > > R=leszeks@chromium.org > > > > Bug: v8:9396 > > Change-Id: I97a183afebcccd2fbb567bdba02e827331475608 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1800577 > > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#63808} > > Bug: v8:9396 > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng > Change-Id: I9cd754ebe6b802bb4aabd6d2a448de41da040874 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807357 > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63823} TBR=leszeks@chromium.org,clemensh@chromium.org Change-Id: Ic53ab2293d5dc7722a1121d1aa1159328a6ed8f5 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:9396 Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1808035Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#63854}
-
Clemens Hammacher authored
This allows to remove special casing for the {count == 0} case, which was needed because {memmove} does not accept {nullptr} arguments even if the {count} is zero. R=leszeks@chromium.org Bug: v8:9396 Change-Id: Iaef3cdbbffa74c2ba1c4e4501dafd943282cbcd9 Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1807366Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#63838}
-
- 29 Aug, 2019 1 commit
-
-
Igor Sheludko authored
... to let C++ compiler know that isolate root is 4Gb aligned and give it a chance to generate a better code. Bug: v8:9353 Change-Id: Ibd23c14cc44107c722a446a84dd14ca66f3bccfe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776079Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#63445}
-
- 08 Aug, 2019 1 commit
-
-
Patrick Thier authored
This CL changes the dispatch technique in the regex interpreter to token-threaded dispatch, if computed gotos are supported by the compiler. Otherwise old switch-based dispatch is still used (e.g. for MSVC). With computed gotos, less jumps will be emitted (no extra jump to single branch point/begin of switch) and branch prediction will be better because of no single branch point. This CL improves performance on the RexBench Benchmark suite by ~10%. Bug: v8:9575 Change-Id: I585ad824ff1cc595a5dfa8831ad66d6810d0119b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1733073Reviewed-by: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Patrick Thier <pthier@google.com> Cr-Commit-Position: refs/heads/master@{#63126}
-
- 26 Jun, 2019 1 commit
-
-
Sigurd Schneider authored
This makes sure that BUILDING_V8_SHARED and USING_V8_SHARED are not both set at once. Change-Id: Iba3a4fac37518b6ec3658da4575453a7967ece0f Bug: v8:8855 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627978Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#62369}
-
- 17 Apr, 2019 1 commit
-
-
Jakob Gruber authored
Add OS detection for iOS builds. If we are building for an iOS target, the following V8 OS defines will be set: V8_OS_BSD V8_OS_MACOSX V8_OS_POSIX V8_OS_IOS // This one is new. The detection code is taken from Chromium's build_config.h file. Bug: v8:9140 Change-Id: I435a8931dc0ae0eefdb893bc838a04470bcc57db Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1569435Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Auto-Submit: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#60897}
-