Skip to content

Commit

Permalink
Fix rare crash when looking for a function name
Browse files Browse the repository at this point in the history
If we fall back to DWARF processing trying to find a function name we deallocated the wrong object because of a copy/paste error. This part of the code was hit only very rarely, which made this bug undetected for a long time.
  • Loading branch information
pedronavf committed Aug 6, 2020
1 parent 6203f1f commit ca5480c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2831,7 +2831,7 @@ class TraceResolverLinuxImpl<trace_resolver_tag::libdwarf>
trace.object_function = demangler.demangle(linkage);
dwarf_dealloc(dwarf, linkage, DW_DLA_STRING);
}
dwarf_dealloc(dwarf, name, DW_DLA_ATTR);
dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR);
}
break;

Expand Down

0 comments on commit ca5480c

Please sign in to comment.