Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double-free in drag and drop, detected by asan builds #295

Open
nyanpasu64 opened this issue Sep 16, 2024 · 0 comments
Open

double-free in drag and drop, detected by asan builds #295

nyanpasu64 opened this issue Sep 16, 2024 · 0 comments

Comments

@nyanpasu64
Copy link
Collaborator

=================================================================
==17024==ERROR: AddressSanitizer: attempting double-free on 0x1218fddead90 in thread T0:
==17024==WARNING: Failed to use and restart external symbolizer!
    #0 0x7ffa04c433b8 in _asan_wrap_GlobalFree+0xb8 (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\clang_rt.asan_dynamic-x86_64.dll+0x1800433b8)
    #1 0x7ffb0e65d18c in ReleaseStgMedium+0xcc (C:\WINDOWS\System32\ole32.dll+0x18000d18c)
    #2 0x7ffa081ecf65  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18025cf65)
    #3 0x7ffa081ecefd  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18025cefd)
    #4 0x7ffa0824cd2a  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802bcd2a)
    #5 0x7ff6ab1e201e in std::_Ref_count<COleDataSource>::_Destroy C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory:1190
    #6 0x7ff6ab152154 in std::_Ref_count_base::_Decref C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\memory:1163
    #7 0x7ff6ab1d0ad6 in CFamiTrackerView::BeginDragData C:\Users\user\code\Dn-FamiTracker\Source\FamiTrackerView.cpp:4148
    #8 0x7ff6ab313505 in CPatternEditor::ContinueMouseSelection C:\Users\user\code\Dn-FamiTracker\Source\PatternEditor.cpp:3151
    #9 0x7ff6ab322743 in CPatternEditor::OnMouseMove C:\Users\user\code\Dn-FamiTracker\Source\PatternEditor.cpp:3243
    #10 0x7ff6ab1da1c8 in CFamiTrackerView::OnMouseMove C:\Users\user\code\Dn-FamiTracker\Source\FamiTrackerView.cpp:808
    #11 0x7ffa08227cc0  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x180297cc0)
    #12 0x7ffa082274ee  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802974ee)
    #13 0x7ffa08224d0d  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x180294d0d)
    #14 0x7ffa082250d3  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802950d3)
    #15 0x7ffa080ca3d8  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18013a3d8)
    #16 0x7ffb0e1682e0 in DispatchMessageW+0x740 (C:\WINDOWS\System32\USER32.dll+0x1800182e0)
    #17 0x7ffb0e167da0 in DispatchMessageW+0x200 (C:\WINDOWS\System32\USER32.dll+0x180017da0)
    #18 0x7ffa0820dee1  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18027dee1)
    #19 0x7ffa0820e7f0  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18027e7f0)
    #20 0x7ffa08240b5f  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802b0b5f)
    #21 0x7ff6ab3708e5 in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    #22 0x7ffb0e09257c in BaseThreadInitThunk+0x1c (C:\WINDOWS\System32\KERNEL32.DLL+0x18001257c)
    #23 0x7ffb0ebaaf27 in RtlUserThreadStart+0x27 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18005af27)

0x1218fddead90 is located 0 bytes inside of 72-byte region [0x1218fddead90,0x1218fddeadd8)
freed by thread T0 here:
    #0 0x7ffa04c433b8 in _asan_wrap_GlobalFree+0xb8 (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\clang_rt.asan_dynamic-x86_64.dll+0x1800433b8)
    #1 0x7ff6ab1d0a8e in CFamiTrackerView::BeginDragData C:\Users\user\code\Dn-FamiTracker\Source\FamiTrackerView.cpp:4147
    #2 0x7ff6ab313505 in CPatternEditor::ContinueMouseSelection C:\Users\user\code\Dn-FamiTracker\Source\PatternEditor.cpp:3151
    #3 0x7ff6ab322743 in CPatternEditor::OnMouseMove C:\Users\user\code\Dn-FamiTracker\Source\PatternEditor.cpp:3243
    #4 0x7ff6ab1da1c8 in CFamiTrackerView::OnMouseMove C:\Users\user\code\Dn-FamiTracker\Source\FamiTrackerView.cpp:808
    #5 0x7ffa08227cc0  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x180297cc0)
    #6 0x7ffa082274ee  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802974ee)
    #7 0x7ffa08224d0d  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x180294d0d)
    #8 0x7ffa082250d3  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802950d3)
    #9 0x7ffa080ca3d8  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18013a3d8)
    #10 0x7ffb0e1682e0 in DispatchMessageW+0x740 (C:\WINDOWS\System32\USER32.dll+0x1800182e0)
    #11 0x7ffb0e167da0 in DispatchMessageW+0x200 (C:\WINDOWS\System32\USER32.dll+0x180017da0)
    #12 0x7ffa0820dee1  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18027dee1)
    #13 0x7ffa0820e7f0  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18027e7f0)
    #14 0x7ffa08240b5f  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802b0b5f)
    #15 0x7ff6ab3708e5 in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    #16 0x7ffb0e09257c in BaseThreadInitThunk+0x1c (C:\WINDOWS\System32\KERNEL32.DLL+0x18001257c)
    #17 0x7ffb0ebaaf27 in RtlUserThreadStart+0x27 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18005af27)

previously allocated by thread T0 here:
    #0 0x7ffa04c43116 in _asan_wrap_GlobalAlloc+0xd6 (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\clang_rt.asan_dynamic-x86_64.dll+0x180043116)
    #1 0x7ff6ab1d0983 in CFamiTrackerView::BeginDragData C:\Users\user\code\Dn-FamiTracker\Source\FamiTrackerView.cpp:4120
    #2 0x7ff6ab313505 in CPatternEditor::ContinueMouseSelection C:\Users\user\code\Dn-FamiTracker\Source\PatternEditor.cpp:3151
    #3 0x7ff6ab322743 in CPatternEditor::OnMouseMove C:\Users\user\code\Dn-FamiTracker\Source\PatternEditor.cpp:3243
    #4 0x7ff6ab1da1c8 in CFamiTrackerView::OnMouseMove C:\Users\user\code\Dn-FamiTracker\Source\FamiTrackerView.cpp:808
    #5 0x7ffa08227cc0  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x180297cc0)
    #6 0x7ffa082274ee  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802974ee)
    #7 0x7ffa08224d0d  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x180294d0d)
    #8 0x7ffa082250d3  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802950d3)
    #9 0x7ffa080ca3d8  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18013a3d8)
    #10 0x7ffb0e1682e0 in DispatchMessageW+0x740 (C:\WINDOWS\System32\USER32.dll+0x1800182e0)
    #11 0x7ffb0e167da0 in DispatchMessageW+0x200 (C:\WINDOWS\System32\USER32.dll+0x180017da0)
    #12 0x7ffa0820dee1  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18027dee1)
    #13 0x7ffa0820e7f0  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x18027e7f0)
    #14 0x7ffa08240b5f  (C:\WINDOWS\SYSTEM32\mfc140.dll+0x1802b0b5f)
    #15 0x7ff6ab3708e5 in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    #16 0x7ffb0e09257c in BaseThreadInitThunk+0x1c (C:\WINDOWS\System32\KERNEL32.DLL+0x18001257c)
    #17 0x7ffb0ebaaf27 in RtlUserThreadStart+0x27 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18005af27)

SUMMARY: AddressSanitizer: double-free (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\clang_rt.asan_dynamic-x86_64.dll+0x1800433b8) in _asan_wrap_GlobalFree+0xb8
Address Sanitizer Error: Deallocation of freed memory

Full error details can be found in the Debug Output window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant