diff options
| author | Michael Pratt <mpratt@google.com> | 2024-06-27 17:18:51 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-08-01 19:13:58 +0000 |
| commit | 2caf638e2f8abf3ed765d553164fc3e46e1bf407 (patch) | |
| tree | 1f2fd579c1901b4c182e729ea4b46a4beefee406 /src/runtime/export_debug_test.go | |
| parent | 38f0a829aa041cbe5f694da52d733352aa5b70bc (diff) | |
| download | go-2caf638e2f8abf3ed765d553164fc3e46e1bf407.tar.xz | |
runtime: don't use maps in js note implementation
notes are used in sensitive locations in the runtime, such as those with
write barriers forbidden. Maps aren't designed for this sort of internal
use.
Notably, newm -> notewakeup doesn't allow write barriers, but mapaccess1
-> panic contains write barriers. The js runtime only builds right now
because the map access is optimized to mapaccess1_fast64, which happens
to not have a panic call.
The initial swisstable map implementation doesn't have a fast64 variant.
While we could add one, it is a bad idea in general to use a map in such
a fragile location. Simplify the implementation by storing the metadata
directly in the note, and using a linked list for checkTimeouts.
For #54766.
Cq-Include-Trybots: luci.golang.try:gotip-js-wasm
Change-Id: Ib9d39f064ae4ad32dcc873f799428717eb6c2d5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/595558
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/export_debug_test.go')
0 files changed, 0 insertions, 0 deletions
