mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
A new plan was copied into its slot as a whole struct, which wrote the slot's pc with a plain store while other threads' lookups read it atomically: a data race. The insert now copies the fields after pc and publishes pc only with the release store. The unwinder test also runs its threaded cases under ThreadSanitizer, which reports the race without this change.