http://bugs.winehq.org/show_bug.cgi?id=58340
Bug ID: 58340 Summary: dbghelp: symt_add_func_line, possible use after free. Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: dbghelp Assignee: wine-bugs@winehq.org Reporter: bernhardu@mailbox.org Distribution: ---
ASan reports function `symt_add_func_line`. There in line 446 memory gets accessed via the pointer `prev` which got freed in `vector_add` by a HeapReAlloc.
An example ASan output is available here: https://gitlab.winehq.org/bernhardu/wine/-/blob/asan-pe_2025-05-06_wine-10.8...
This shows up only with ASAN_OPTION windows_hook_rtl_allocators=1.
A possible solution might be simply to repeat the assignment of `prev` from line 429 after the `vector_add` in line 438?