Skip to content

Commit

Permalink
Fix an assertion failure
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Aug 5, 2024
1 parent 893ec1b commit 43d9536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elf/passes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ R"(# This is an output of the mold linker's --print-dependencies option.
std::unordered_set<void *> visited;

for (const ElfRel<E> &r : isec->get_rels(ctx)) {
if (r.r_type == R_NONE)
if (r.r_type == R_NONE || file->elf_syms.size() <= r.r_sym)
continue;

ElfSym<E> &esym = file->elf_syms[r.r_sym];
Expand Down

0 comments on commit 43d9536

Please sign in to comment.