v8/test/unittests/base
Clemens Backes e44c745d0f Reland "[base] Add new API to protect data memory"
This is a reland of commit 9d36b2dd0d.
The test case is fixed to actually protect a part of the data section
instead of the stack (which was unintended and could lead to segfaults).

Original change's description:
> [base] Add new API to protect data memory
>
> This adds a new {base::OS::SetDataReadOnly} method, which is similar to
> {SetPermissions(kRead)}, but using another system call on Windows such
> that it works on pages in the data segment.
> {VirtualAlloc} will fail if called on a page of the data section,
> whereas {VirtualProtect} succeeds. For the general {SetPermissions}
> API we still want to use {VirtualAlloc} though, as it also changes the "committed" state of the pages.
>
> Note that we do not add a platform API for this, as the memory was
> never allocated through the platform. We just directly protect it in
> V8.
>
> R=mlippautz@chromium.org
>
> Bug: v8:12887
> Change-Id: If83bf6e5c500cc5cf08c76d04dfac5e2b4d35a2d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820482
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82349}

Bug: v8:12887
Change-Id: Ib7c24b43b53d568dafb4a56cf8db7479c784e8d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825889
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82398}
2022-08-11 13:06:07 +00:00
..
platform Reland "[base] Add new API to protect data memory" 2022-08-11 13:06:07 +00:00
utils Fix v8 unittests broken on official builds by recent crash logging changes 2021-07-05 07:38:47 +00:00
address-region-unittest.cc Fix -Wc++11-narrowing in V8. 2021-06-09 22:47:37 +00:00
atomic-utils-unittest.cc Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
atomicops-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
bignum-dtoa-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
bignum-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
bits-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
cpu-unittest.cc [ia32][x64] Detect AVX2 2020-12-17 05:44:54 +00:00
division-by-constant-unittest.cc [cleanup][test] Remove redundant NOLINT annotations 2021-04-30 11:46:14 +00:00
double-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
dtoa-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
fast-dtoa-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
fixed-dtoa-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
flags-unittest.cc [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
functional-unittest.cc [cleanup] Remove DISALLOW_COPY_AND_ASSIGN in test/{common,unittests} 2020-11-06 06:07:54 +00:00
hashmap-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
ieee754-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
iterator-unittest.cc Improve iterator_range to take non-&& arguments 2020-01-28 13:03:43 +00:00
logging-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
macros-unittest.cc Account for different interpretations of "trivially copyable" 2018-03-02 15:45:14 +00:00
ostreams-unittest.cc Move utility code to src/utils 2019-05-23 14:13:34 +00:00
region-allocator-unittest.cc Introduce v8_enable_virtual_memory_cage 2021-08-11 16:13:42 +00:00
string-format-unittest.cc Fix MSVC compilation of FormattedStringTest 2022-05-13 17:46:23 +00:00
sys-info-unittest.cc Remove NaCl support. 2016-07-27 07:50:31 +00:00
template-utils-unittest.cc [base] Remove base::fold and base::all 2022-04-07 09:13:49 +00:00
threaded-list-unittest.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
vector-unittest.cc [test] Remove some unused includes (2) 2022-07-19 08:55:55 +00:00
virtual-address-space-unittest.cc [base] Don't return bool from VirtualAddressSpace::Free* routines 2022-03-07 16:53:23 +00:00
vlq-base64-unittest.cc Add Base64 VLQ decoding support 2019-07-16 16:16:24 +00:00
vlq-unittest.cc [sparkplug][cleanup] Add helper to en-/decode VLQ. 2021-02-25 15:05:01 +00:00