Descent3/music
Jan Engelhardt 1da600caf2 Resolve alloc-dealloc-mismatch in OutrageMusicSeq::FreeList
Once a level is loaded/started, the program runs into:

==17675==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs operator delete []) on 0x50800031be20
    f0 operator delete[](void*) (/lib64/libasan.so.8+0xfde68) (BuildId: 5615a04b8d0a5a8eafa661f7235e2d98fa2b9137)
    f1 OutrageMusicSeq::FreeList() $GIT/music/sequencer.cpp:675
    f2 OutrageMusicSeq::Shutdown() $GIT/music/sequencer.cpp:208
    f3 D3MusicStop() $GIT/Descent3/d3music.cpp:118
    f4 mmInterface::OnDestroy() $GIT/Descent3/mmItem.cpp:400
    f5 UIWindow::Destroy() $GIT/ui/UIWindow.cpp:203
    f6 MainMenu() $GIT/Descent3/menu.cpp:911
    f7 MainLoop() $GIT/Descent3/descent.cpp:546
    f8 Descent3() $GIT/Descent3/descent.cpp:508
    f9 oeD3LnxApp::run() $GIT/Descent3/sdlmain.cpp:151

0x50800031be20 is located 0 bytes inside of 88-byte region [0x50800031be20,0x50800031be78)
allocated by thread T0 here:
    f0 operator new(unsigned long) (/lib64/libasan.so.8+0xfd2f8) (BuildId: 5615a04b8d0a5a8eafa661f7235e2d98fa2b9137)
    f1 OutrageMusicSeq::AddToList(short, short, int, OutrageMusicSeq::music_ins const*) $GIT/music/sequencer.cpp:653
    f2 OutrageMusicSeq::LoadTheme(char const*) $GIT/music/omflex.cpp:310
    f3 OutrageMusicSeq::Init(char const*) $GIT/music/sequencer.cpp:198
    f4 D3MusicStart(char const*) $GIT/Descent3/d3music.cpp:80
    f5 mmInterface::Create() $GIT/Descent3/mmItem.cpp:353
    f6 MainMenu() $GIT/Descent3/menu.cpp:732
    f7 MainLoop() $GIT/Descent3/descent.cpp:546
    f8 Descent3() $GIT/Descent3/descent.cpp:508
    f9 oeD3LnxApp::run() $GIT/Descent3/sdlmain.cpp:151
2024-08-30 01:26:00 +02:00
..
CMakeLists.txt CMake: add all headers to target sources 2024-08-09 17:09:14 +02:00
music.h [Cleanup] Removed function declarations that are not implemented. 2024-08-20 20:03:02 +02:00
musiclib.h Updated source to reflect the license that this code is released under. 2024-04-20 09:57:49 -06:00
omflex.cpp Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
sequencer.cpp Resolve alloc-dealloc-mismatch in OutrageMusicSeq::FreeList 2024-08-30 01:26:00 +02:00
streamer.cpp Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
tracklist.cpp Replace "short" with "int16_t" and fix missing headers 2024-05-23 23:49:31 -04:00