FS#41651 - [openal] Address Sanitizer complains free() about OpenAL when closing device.
Attached to Project:
Arch Linux
Opened by Nick Overdijk (Nickert) - Thursday, 21 August 2014, 18:39 GMT
Last edited by Jan Alexander Steffens (heftig) - Friday, 19 September 2014, 07:40 GMT
Opened by Nick Overdijk (Nickert) - Thursday, 21 August 2014, 18:39 GMT
Last edited by Jan Alexander Steffens (heftig) - Friday, 19 September 2014, 07:40 GMT
|
Details
Description:
When my project closes an OpenAL device, ASAN reports an error. This wasn't the case a couple of days ago. Additional info: * package version(s) * config and/or log files etc. ASAN report: ================================================================= ==7503==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x000003fb8010 in thread T0 #0 0x5b2099 in __interceptor_free (/home/nick/code/onegame/build-Debug/src/mirror_massacre+0x5b2099) #1 0x7f29354bf3b1 (/usr/lib/libopenal.so.1+0x2a3b1) #2 0x604965 in motor::al::close_device(ALCdevice_struct*) /home/nick/code/onegame/motor/../motor/al.hpp:65 #3 0x6047c2 in motor::al::Device::~Device() /home/nick/code/onegame/motor/../motor/al.hpp:198 #4 0x603d93 in motor::al::Context::~Context() /home/nick/code/onegame/motor/../motor/al.hpp:230 #5 0x603a25 in motor::al::AL::~AL() /home/nick/code/onegame/motor/../motor/sound.hpp:35 #6 0x5d3337 in GenericMain<games::mirror_massacre::MirrorMassacre>::~GenericMain() /home/nick/code/onegame/src/generic_main.hpp:245 #7 0x5c9c78 in main /home/nick/code/onegame/src/mirror_massacre_main.cpp:21 #8 0x7f2932e15fff in __libc_start_main (/usr/lib/libc.so.6+0x1ffff) #9 0x5c82fc in _start (/home/nick/code/onegame/build-Debug/src/mirror_massacre+0x5c82fc) AddressSanitizer can not describe address in more detail (wild memory access suspected). SUMMARY: AddressSanitizer: bad-free ??:0 __interceptor_free ==7503==ABORTING Steps to reproduce: nick@fusrodah:/tmp$ cat openal-asan-trigger.cpp #include <AL/al.h> #include <AL/alc.h> int main(){ ALCdevice* d = alcOpenDevice(0); alcCloseDevice(d); } nick@fusrodah:/tmp$ clang++ -fsanitize=address openal-asan-trigger.cpp -lopenal nick@fusrodah:/tmp$ ./a.out ================================================================= ==7999==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x0000034cc010 in thread T0 #0 0x465499 in __interceptor_free (/tmp/a.out+0x465499) #1 0x7f905849e3b1 (/usr/lib/libopenal.so.1+0x2a3b1) #2 0x47b8d2 in main (/tmp/a.out+0x47b8d2) #3 0x7f9057292fff in __libc_start_main (/usr/lib/libc.so.6+0x1ffff) #4 0x47b6fc in _start (/tmp/a.out+0x47b6fc) AddressSanitizer can not describe address in more detail (wild memory access suspected). SUMMARY: AddressSanitizer: bad-free ??:0 __interceptor_free ==7999==ABORTING ✗ - status code 1 |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Friday, 19 September 2014, 07:40 GMT
Reason for closing: Fixed
Additional comments about closing: clang 3.5
Friday, 19 September 2014, 07:40 GMT
Reason for closing: Fixed
Additional comments about closing: clang 3.5
==8273==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x000001ace010 in thread T0
#0 0x7f7ae1cab8ff in __interceptor_free (/usr/lib/libasan.so.1+0x578ff)
#1 0x7f7ae036f3b1 in alcCloseDevice (/usr/lib/libopenal.so.1+0x2a3b1)
#2 0x728178 in CSoundDevice::~CSoundDevice() /home/charon/Projekte/adeptus-project/trunk/inquisitor/src/engine/sound/CSoundDevice.cpp:46
#3 0x444e0c in CTaskSound::~CTaskSound() /home/charon/Projekte/adeptus-project/trunk/inquisitor/src/engine/tasks/CTaskSound.cpp:47
#4 0x444e65 in CTaskSound::~CTaskSound() /home/charon/Projekte/adeptus-project/trunk/inquisitor/src/engine/tasks/CTaskSound.cpp:48
#5 0x465156 in CKernel::RemoveDeadTasks() /home/charon/Projekte/adeptus-project/trunk/inquisitor/src/engine/system/CKernel.cpp:159
#6 0x464013 in CKernel::Execute() /home/charon/Projekte/adeptus-project/trunk/inquisitor/src/engine/system/CKernel.cpp:68
#7 0x475d68 in CEngine::Run() /home/charon/Projekte/adeptus-project/trunk/inquisitor/src/engine/system/CEngine.cpp:137
#8 0x4697f6 in main /home/charon/Projekte/adeptus-project/trunk/inquisitor/src/engine/system/Main.cpp:117
#9 0x7f7adf113fff in __libc_start_main (/usr/lib/libc.so.6+0x1ffff)
#10 0x412c98 (/home/charon/Projekte/adeptus-project/trunk/inquisitor/bin/Debug/inquisitor+0x412c98)
AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: bad-free ??:0 __interceptor_free
==8273==ABORTING
Can't really tell since when this problem exists.
Anything I can do to help?