AddressSanitizer with SDL and IOS


I am not sure if this issue is SDL related or more AddressSanitizer
related. But I wanted to share it with you guys if you have any ideas. I
have compiled latest SDL from svn and latest llvm with clang from svn. I
used SDL with IOS 7.0 successfully without any issues . I decided to try
the AddressSanitizer to check my code. I used custom clang in Xcode with
the -fsanitize=address
flag. This is the output . Is there anything special I have to do in order
to get it working. The output doesn’t look right to me.=================================================================

==19471==ERROR: AddressSanitizer: attempting double-free on 0x0ab7a170
in thread T0:

#0 0x11e035 in wrap_free _asan_rtl_
#1 0x5f764 in SDL_DestroySemaphore SDL_syssem.c:119
#2 0x5f1a0 in SDL_CreateThread SDL_thread.c:382
#3 0x5fd62 in SDL_TimerInit SDL_timer.c:233

#4 0xef2e in SDL_InitSubSystem SDL.c:158
#5 0x2d2f in Game::init Game.cpp:15
#6 0x5a9d in SDL_main main.cpp:26
#7 0x95e80 in -[SDLUIKitDelegate postFinishLaunch]

#8 0xa3512b in __NSFireDelayedPerform (in Foundation) + 371
#9 0x29dcbd5 in
CoreFoundation) + 21
#10 0x29dc5bc in __CFRunLoopDoTimer (in CoreFoundation) + 1180
#11 0x29c4627 in __CFRunLoopRun (in CoreFoundation) + 1815
#12 0x29c3ac2 in CFRunLoopRunSpecific (in CoreFoundation) + 466
#13 0x29c38da in CFRunLoopRunInMode (in CoreFoundation) + 122
#14 0x45d19e1 in GSEventRunModal (in GraphicsServices) + 191
#15 0x45d1808 in GSEventRun (in GraphicsServices) + 103
#16 0xe0fd3a in UIApplicationMain (in UIKit) + 1224
#17 0x959aa in main SDL_uikitappdelegate.m:59
#18 0x2fa770c in start (in libdyld.dylib) + 0
#19 0x0 in 0x0

0x0ab7a170 is located 0 bytes inside of 28-byte region [0x0ab7a170,0x0ab7a18c)
freed by thread T0 here:
==19471==AddressSanitizer CHECK failed:
/Users/sabotage3d/DEV/libs/llvm/projects/compiler-unsigned short
restrict/lib/asan/ “((id)) != (0)” (0x0, 0x0)
#0 0x126de7 in __asan::AsanCheckFailed asan_rtl
#1 0x12ac21 in __sanitizer::CheckFailed