Module: wine Branch: master Commit: e105e9d35ee9f28f5a1615cd8f2b582ae8d82041 URL: https://source.winehq.org/git/wine.git/?a=commit;h=e105e9d35ee9f28f5a1615cd8...
Author: Eric Pouech eric.pouech@gmail.com Date: Mon Nov 8 14:57:32 2021 +0100
dbghelp: Check that we don't add same line number twice.
This happens (at least) in dwarf debug info where there could be two entries with same source file and line number, but different column numbers (and we don't store columns).
Signed-off-by: Eric Pouech eric.pouech@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dbghelp/symbol.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 7747aaae2ae..435d94bc8eb 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -418,6 +418,11 @@ void symt_add_func_line(struct module* module, struct symt_function* func, } vlen = vector_length(&func->vlines); prev = vlen ? vector_at(&func->vlines, vlen - 1) : NULL; + if (last_matches && prev && addr == prev->u.address) + { + WARN("Duplicate addition of line number in %s\n", func->hash_elt.name); + return; + } if (!last_matches) { /* we shouldn't have line changes on first line of function */