Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Issue 2202433003: [wasm] Use a LazyInstance in wasm-linkage.cc to avoid a data race. (Closed)

Created:
4 years, 4 months ago by ahaas
Modified:
4 years, 4 months ago
Reviewers:
titzer
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Use a LazyInstance in wasm-linkage.cc to avoid a data race. The initialization of static variables that were used originally caused a data race because multiple threads tried to initialize the variables at the same time. The use of a LazyInstance guarantees that the variables get initialized exactly once. The same problem also existed in c-linkage.cc. There I fixed the problem by using a local variable instead of a static variable. BUG=v8:5242 R=titzer@chromium.org Committed: https://crrev.com/282cdf28ae13fbe6bca5cc4bd35d1f4e37372073 Cr-Commit-Position: refs/heads/master@{#38221}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -43 lines) Patch
M src/compiler/c-linkage.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M src/compiler/wasm-linkage.cc View 6 chunks +45 lines, -38 lines 0 comments Download

Messages

Total messages: 11 (6 generated)
ahaas
4 years, 4 months ago (2016-08-01 07:24:51 UTC) #1
titzer
lgtm
4 years, 4 months ago (2016-08-01 16:55:03 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2202433003/1
4 years, 4 months ago (2016-08-01 21:03:07 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-01 21:04:47 UTC) #9
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 21:06:25 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/282cdf28ae13fbe6bca5cc4bd35d1f4e37372073
Cr-Commit-Position: refs/heads/master@{#38221}

Powered by Google App Engine
This is Rietveld 408576698