Skip to content

Commit f0e9abc

Browse files
committed
add assertion to catch AccessSet usage errors
I ran into this while implementing async actor inits; where I was emitting an actor hop in the middle of an access region, which caused the access set to be unexpectedly empty.
1 parent 73a3881 commit f0e9abc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/runtime/Exclusivity.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ class AccessSet {
202202
}
203203

204204
void remove(Access *access) {
205+
assert(Head && "removal from empty AccessSet");
205206
auto cur = Head;
206207
// Fast path: stack discipline.
207208
if (cur == access) {

0 commit comments

Comments
 (0)