https://bugs.winehq.org/show_bug.cgi?id=50993
--- Comment #20 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to Roman Pišl from comment #19)
Good to hear. Please, test if the already accepted fix works for you.
Thanks for your fix, it works like a charm.
Without it ASan operates directly on something named HeapFree: interception_win: instruction at 0x6fffffa522c0: ff 25 9a e6 03 00 90 90 0x00006fffffa522c0 <HeapFree+0>: ff 25 9a e6 03 00
But with you fix ASan operates on something gdb identifies as __wine_spec_imp_HeapFree: interception_win: instruction at 0x6fffffa4e5d0: 48 8d a4 24 00 00 00 00 0x00006fffffa4e5d0 <__wine_spec_imp_HeapFree+0>: 48 8d a4 24 00 00 00 00
After all I wonder why ff 25 currently does not get used for interception. The similar jmp 48 ff 25 gets used. And previously there were two lines for ff 25, just the latter got never reached: https://github.com/llvm/llvm-project/commit/a943922c0 One explanation could be it is used to detect already intercepted functions, because test OverrideFunctionMultiplePatchingIsFailing would start to fail. But I guess this starts to get offtopic here.