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

Unified Diff: src/IceCfg.cpp

Issue 1460003003: Fix race condition in jump table list creation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add some missing consts Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceGlobalContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 65844b9f9872c03ddf45bfa00be1d0cee6b2eda3..3fe37f3c87eba936ee72bbf83c23955ec137db9f 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -966,12 +966,13 @@ void Cfg::emitJumpTables() {
IceString MangledName = Ctx->mangleName(getFunctionName());
for (const InstJumpTable *JumpTable : JumpTables) {
SizeT NumTargets = JumpTable->getNumTargets();
- JumpTableData &JT =
- Ctx->addJumpTable(MangledName, JumpTable->getId(), NumTargets);
+ JumpTableData::TargetList TargetList;
for (SizeT I = 0; I < NumTargets; ++I) {
SizeT Index = JumpTable->getTarget(I)->getIndex();
- JT.pushTarget(getAssembler()->getCfgNodeLabel(Index)->getPosition());
+ TargetList.emplace_back(
+ getAssembler()->getCfgNodeLabel(Index)->getPosition());
}
+ Ctx->addJumpTable(MangledName, JumpTable->getId(), TargetList);
}
} break;
case FT_Asm: {
« no previous file with comments | « no previous file | src/IceGlobalContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698