Skip to content

Commit df9c085

Browse files
committed
AddressLowering: speculative tightening of assertion
On Windows CI builds, we have observed a failure to build the Swift Standard Library after 10/27 (first noticed on 11/11 snapshot due to other failures). The failure is an invalid `isa` cast where the instance is a `nullptr`. The SILPipeline suggests that the SILOptimizer might be the one triggering the incorrect use of `isa`. The only instance of `isa` introduced in that range in the SILOptimizer/Mandatory region for that duration is this particular instance. Tighten the assertion to ensure that `oper->getUser()` returns a non-`nullptr` value. Thanks for @gwynne for helping narrow down the search area.
1 parent aecd449 commit df9c085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Mandatory/AddressLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3654,7 +3654,7 @@ static void rewriteFunction(AddressLoweringState &pass) {
36543654
uses.push_back(use);
36553655
}
36563656
for (auto *oper : uses) {
3657-
assert(isa<DebugValueInst>(oper->getUser()));
3657+
assert(oper->getUser() && isa<DebugValueInst>(oper->getUser()));
36583658
UseRewriter::rewriteUse(oper, pass);
36593659
}
36603660
}

0 commit comments

Comments
 (0)