v8/src
Shu-yu Guo df59f2176e [shared-struct] Fix external pointers to WaiterQueueNodes
WaiterQueueNodes as used by JS synchronization primitives are per-main
thread, and external pointer handles to those nodes are 1-1. That
1-1-ness is captured by each main thread Isolate having a
waiter_queue_node_external_pointer_ field.

The current logic is incorrect on unlock paths as the Isolate that
requested the unlock can point its own
waiter_queue_node_external_pointer_ to another Isolate's
WaiterQueueNode. This CL fixes this by having each WaiterQueueNode hold onto its own external pointer handle.

This CL also fixes an embarrassing bug where the WaiterQueueNode was not correctly dequeued on timeout.

Bug: v8:13189, v8:12547
Change-Id: I8db16ae6d653d2e71989ad003faae20fcee06a25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3832298
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82601}
2022-08-19 16:52:43 +00:00
..
api [sandbox] Merge V8_SANDBOXED_POINTERS into V8_ENABLE_SANDBOX 2022-08-19 10:54:38 +00:00
asmjs [wasm] Introduce separate limits for memory64 2022-07-26 10:36:11 +00:00
ast Make bitfields only as wide as necessary for enums 2022-08-01 15:09:04 +00:00
base [flags] loong64 and mips64 use 16kB pages 2022-08-19 12:08:24 +00:00
baseline PPC/s390: [masm][cleanup] Refactor call related assembler options 2022-08-17 14:33:26 +00:00
bigint Reland "Remove some unused includes" 2022-07-05 16:44:13 +00:00
builtins [shared-struct] Make publishing of shared objects safe 2022-08-19 15:14:32 +00:00
codegen [heap] Skip generated code write barrier for minor incremental marking 2022-08-19 12:10:19 +00:00
common Reland^2 "[shared-struct] Add Atomics.Condition" 2022-08-11 00:12:22 +00:00
compiler [compiler] Make ReduceWord32EqualForConstantRhs work for Word64Equal 2022-08-19 13:02:39 +00:00
compiler-dispatcher [compiler] Park main thread while awaiting compile tasks 2022-08-10 21:43:52 +00:00
d8 Reland "Fix Context PromiseHook behaviour with debugger enabled" 2022-08-18 20:36:37 +00:00
date Fix Date BiDi format 2022-07-11 17:19:43 +00:00
debug [stringrefs] Support stringrefs in DevTools inspection 2022-08-17 19:12:09 +00:00
deoptimizer [BUILD] Add v8_use_zlib flag 2022-08-17 14:25:56 +00:00
diagnostics Reland "[sandbox] Sandboxify WasmExportedFunctionData::sig" 2022-08-18 14:41:01 +00:00
execution [shared-struct] Fix external pointers to WaiterQueueNodes 2022-08-19 16:52:43 +00:00
extensions [heap] Statistics extension needs to check whether new space exists 2022-03-23 09:30:51 +00:00
flags [turbolizer] Presenting filename in the tab label 2022-08-18 14:43:06 +00:00
handles [handles] Remove black allocation of traced nodes 2022-08-18 11:43:06 +00:00
heap [shared-struct] Make publishing of shared objects safe 2022-08-19 15:14:32 +00:00
ic [runtime] return when failed access callback doesn't throw 2022-07-06 14:01:36 +00:00
init [change-array-by-copy] Implement Array.prototype.toSorted 2022-08-16 14:11:53 +00:00
inspector [inspector] Fix crash when building preview with a proxy prototype 2022-08-16 13:19:33 +00:00
interpreter [heap] Invoke internal GC callbacks before Heap verification 2022-08-17 09:00:28 +00:00
json [heap] Invoke internal GC callbacks before Heap verification 2022-08-17 09:00:28 +00:00
libplatform [libplatform] Spawn more tasks from DefaultJobState::Join 2022-08-03 14:59:28 +00:00
libsampler Reland "[riscv32] Add RISCV32 backend" 2022-08-04 12:47:44 +00:00
logging [sandbox] Implement external pointer table compaction 2022-08-16 10:46:27 +00:00
maglev [heap, maglev] Add shared barrier for Maglev generated code 2022-08-18 07:17:06 +00:00
numbers [bigint] Fix object literal property keys like 0x0n 2022-05-20 11:21:15 +00:00
objects [shared-struct] Fix external pointers to WaiterQueueNodes 2022-08-19 16:52:43 +00:00
parsing [heap] Invoke internal GC callbacks before Heap verification 2022-08-17 09:00:28 +00:00
profiler fix BE dcheck failure on visited_fields_ 2022-08-17 14:26:58 +00:00
protobuf Remove petermarshall from OWNERS 2021-03-31 11:00:22 +00:00
regexp [ext-code-space] Remove more Code <-> CodeT roundtrips 2022-08-11 10:20:32 +00:00
roots Reland "Move some string allocation functions from Factory to FactoryBase" 2022-08-10 11:20:34 +00:00
runtime Reland "[heap] Handle old-to-new slot promotion to shared heap" 2022-08-17 16:39:18 +00:00
sandbox [sandbox] Always initialize allocated external pointer handles 2022-08-19 15:39:22 +00:00
sanitizer Reland "[elements] Avoid racy data reads/writes" 2021-05-06 10:46:52 +00:00
snapshot PPC/s390: [masm][cleanup] Refactor call related assembler options 2022-08-17 14:33:26 +00:00
strings [cleanup] Cleanup StringStream::PrintFunction() 2022-07-21 12:48:19 +00:00
tasks Remove some unused includes (3) 2022-07-07 09:42:31 +00:00
temporal [Temporal] Fix bug in ScanCalendarDateTimeTimeRequired 2022-08-10 23:44:12 +00:00
third_party Fix vtunejit issues 2022-07-27 13:02:17 +00:00
torque [torque] Print bitfield source positions 2022-08-16 08:25:17 +00:00
tracing [v8] Fix data race in TRACE_EVENT macros. 2022-06-07 00:19:05 +00:00
trap-handler Fix atomic initialization to work with C++20. 2022-05-10 15:43:25 +00:00
utils [API] Prepare deprecation of second OnCriticalMemoryPressure 2022-07-25 12:59:56 +00:00
wasm [wasm-relaxed-simd] Enable i16x8.relaxed_q15mulr_s liftoff on x64/ia32 2022-08-19 16:16:22 +00:00
web-snapshot [web snapshot] Support BigInt 2022-08-10 13:15:15 +00:00
zone [maglev] Extend lifetimes of values used in a loop 2022-07-28 14:55:15 +00:00
DEPS Revert "[heap, api] Check assumptions for embedder fields on set" 2022-08-02 08:04:13 +00:00
DIR_METADATA
OWNERS