You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on Delphi 7, and I'm getting a runtime-crash on exit when there's a memory leak if EnableMemoryLeakReportingUsesQualifiedClassName has been enabled. The problem is the following line in the AppendClassNameToBuffer function:
UnitName := @PClassData(PByte(LClassInfo) + 2 + PByte(PByte(LClassInfo) + 1)^).UnitName;
Due to either Delphi 7 or my project settings, the pointer arithmetic fails, probably raising an exception that tries to allocate memory, resulting in an invalid operation because the MM has already been uninstalled.
I fixed it by changing the line to:
UnitName := @PClassData(PByte(LClassInfo) + 2 + Integer(PByte(PByte(LClassInfo) + 1)^)).UnitName;