Fix crash happening due to invalid pointer to free() (#86868)
authorGiridhar Trivedi <giritrivedi@gmail.com>
Mon, 10 Jul 2023 14:17:11 +0000 (19:47 +0530)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 14:17:11 +0000 (10:17 -0400)
commit228a59662e2f6149d1ea7b230bd52023dd6259c9
tree5a05a8713f6296d8eade2ffb3c40aad7d1eb56bd
parent0655455a10eee8f69da8b1b4de186c63d0bcec13
Fix crash happening due to invalid pointer to free() (#86868)

While working on netcore debugger for mono,the crash was happening.
This crash was due to an invalid pointer to the free(). Valgrind
was showing the traces of mismatch between the new() and delete().
After debugging the issue, even though hidden flag was set on
shared library the objdump on the shared library showed that
the overloaded new() operator was taken from a local scoped library
but overloaded delete() operator was overidden by defaults setting
of underlying system libraries in which delete() was hosted.
Changed the fvisibility flag to ensure that clang picks up the
local new() and delete() overloaded operators.

Co-authored-by: Giridhar Trivedi <giridhar.trivedi@ibm.com>
src/mono/dlls/mscordbi/CMakeLists.txt