Skip to content

Fix an assert in collectUses when handling unknown index offsets. #38492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/SIL/Utils/MemAccessUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ int AccessPathDefUseTraversal::getPathOffset(const DFSEntry &dfs) const {
bool AccessPathDefUseTraversal::checkAndUpdateOffset(DFSEntry &dfs) {
int pathOffset = getPathOffset(dfs);
if (dfs.offset == AccessPath::UnknownOffset) {
if (pathOffset > 0) {
if (pathOffset != 0) {
// Pop the offset from the expected path; there should only be
// one. Continue matching subobject indices even after seeing an unknown
// offset. A subsequent mismatching subobject index is still considered
Expand Down