Skip to content

Commit

Permalink
Assert when adding the same type with different names to the live typ…
Browse files Browse the repository at this point in the history
…e map

Summary: severe_consistency

Reviewed By: alexmalyshev

Differential Revision: D50865534

fbshipit-source-id: 42fb6eaa36274d05e5d917bfb33f68bd0c7111f9
  • Loading branch information
jbower-fb authored and facebook-github-bot committed Nov 3, 2023
1 parent 82b2f32 commit 32cd103
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Jit/live_type_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ void LiveTypeMap::insert(BorrowedRef<PyTypeObject> type) {
type_to_name_.erase(pair.first->second);
pair.first->second = type;
}
type_to_name_[type] = std::move(name);
auto pair2 = type_to_name_.emplace(type, name);
JIT_DCHECK(
!pair.second || pair2.second,
"Name and type maps are inconsistent when inserting name {}",
name);
}

void LiveTypeMap::setPrimedDictKeys(BorrowedRef<PyTypeObject> type) {
Expand Down

0 comments on commit 32cd103

Please sign in to comment.