libsdl-org/sdl2-compat

Gibberish is printed in testautomation

Closed this issue · 4 comments

Running testautomation --filter subsystems, the following is printed:

INFO:  08/06/24 21:02:47: ----- Test Case 23.1: 'subsystems_referenceCount' started
INFO:  08/06/24 21:02:47: Test Description: 'Makes sure that subsystem stays until number of quits matches inits.'
INFO:  08/06/24 21:02:47: Test Iteration 1: execKey 13413488080176734369
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦▄¸ØK¦ 08/06/24 21:02:47: Assert 'Reset all subsystems before subsystems test': Passed
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦▄¸ØK¦ 08/06/24 21:02:47: Assert 'Check result from SDL_WasInit(SDL_INIT_EVERYTHING)': Passed
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦▄¸ØK¦ 08/06/24 21:02:47: Assert 'Check result from SDL_WasInit(0x20)': Passed
s 08/06/24 21:02:47: Assert 'Call to SDL_InitSubSystem(0x20)': Passed
s 08/06/24 21:02:47: Assert 'Check result from SDL_WasInit(0x20), expected: 0x20, got: 0x20': Passed

This happens on Windows, using current SDL3 and sdl2-compat

I know what's going on here, I'll take care of it, thanks!

I am getting this with testautomation --filter subsystems ran under valgrind on linux:

==18761== Invalid read of size 1
==18761==    at 0x4008688: __GI_strlen (mc_replace_strmem.c:404)
==18761==    by 0x9121CE: vfprintf (vfprintf.c:1641)
==18761==    by 0x913B71: buffered_vfprintf (vfprintf.c:2326)
==18761==    by 0x90E972: vfprintf (vfprintf.c:1301)
==18761==    by 0x91915E: fprintf (fprintf.c:33)
==18761==    by 0x449AF72: SDL_LogOutput (SDL_log.c:624)
==18761==    by 0x449AEF1: SDL_LogMessageV_REAL (SDL_log.c:481)
==18761==    by 0x44C7445: SDL_LogMessageV (SDL_dynapi_procs.h:609)
==18761==    by 0x401C962: SDL_LogMessageV_REAL (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x404EB42: SDL_LogMessage (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x8094041: SDLTest_Log (in /tmp/sdl3/test/testautomation)
==18761==    by 0x8089A34: SDLTest_AssertPass (in /tmp/sdl3/test/testautomation)
==18761==  Address 0x4080a38 is 0 bytes inside a block of size 7 free'd
==18761==    at 0x4006CAF: free (vg_replace_malloc.c:446)
==18761==    by 0x457071B: real_free (SDL_malloc.c:5191)
==18761==    by 0x4570A1A: SDL_free_REAL (SDL_malloc.c:5340)
==18761==    by 0x44999FE: SDL_NukeFreeValue (SDL_hashtable.c:323)
==18761==    by 0x449986F: SDL_EmptyHashTable (SDL_hashtable.c:260)
==18761==    by 0x44998D6: SDL_DestroyHashTable (SDL_hashtable.c:273)
==18761==    by 0x449D204: SDL_FreePersistentStrings (SDL_utils.c:333)
==18761==    by 0x4575912: SDL_CleanupTLS_REAL (SDL_thread.c:125)
==18761==    by 0x457596A: SDL_QuitTLSData (SDL_thread.c:136)
==18761==    by 0x4497D50: SDL_QuitMainThread (SDL.c:268)
==18761==    by 0x44984C7: SDL_Quit_REAL (SDL.c:639)
==18761==    by 0x44C7CE0: SDL_Quit (SDL_dynapi_procs.h:657)
==18761== 
==18761== Invalid read of size 1
==18761==    at 0x4008693: __GI_strlen (mc_replace_strmem.c:404)
==18761==    by 0x9121CE: vfprintf (vfprintf.c:1641)
==18761==    by 0x913B71: buffered_vfprintf (vfprintf.c:2326)
==18761==    by 0x90E972: vfprintf (vfprintf.c:1301)
==18761==    by 0x91915E: fprintf (fprintf.c:33)
==18761==    by 0x449AF72: SDL_LogOutput (SDL_log.c:624)
==18761==    by 0x449AEF1: SDL_LogMessageV_REAL (SDL_log.c:481)
==18761==    by 0x44C7445: SDL_LogMessageV (SDL_dynapi_procs.h:609)
==18761==    by 0x401C962: SDL_LogMessageV_REAL (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x404EB42: SDL_LogMessage (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x8094041: SDLTest_Log (in /tmp/sdl3/test/testautomation)
==18761==    by 0x8089A34: SDLTest_AssertPass (in /tmp/sdl3/test/testautomation)
==18761==  Address 0x4080a39 is 1 bytes inside a block of size 7 free'd
==18761==    at 0x4006CAF: free (vg_replace_malloc.c:446)
==18761==    by 0x457071B: real_free (SDL_malloc.c:5191)
==18761==    by 0x4570A1A: SDL_free_REAL (SDL_malloc.c:5340)
==18761==    by 0x44999FE: SDL_NukeFreeValue (SDL_hashtable.c:323)
==18761==    by 0x449986F: SDL_EmptyHashTable (SDL_hashtable.c:260)
==18761==    by 0x44998D6: SDL_DestroyHashTable (SDL_hashtable.c:273)
==18761==    by 0x449D204: SDL_FreePersistentStrings (SDL_utils.c:333)
==18761==    by 0x4575912: SDL_CleanupTLS_REAL (SDL_thread.c:125)
==18761==    by 0x457596A: SDL_QuitTLSData (SDL_thread.c:136)
==18761==    by 0x4497D50: SDL_QuitMainThread (SDL.c:268)
==18761==    by 0x44984C7: SDL_Quit_REAL (SDL.c:639)
==18761==    by 0x44C7CE0: SDL_Quit (SDL_dynapi_procs.h:657)
==18761== 
==18761== Invalid read of size 1
==18761==    at 0x93D130: _IO_default_xsputn (genops.c:480)
==18761==    by 0x91294E: vfprintf (vfprintf.c:1641)
==18761==    by 0x913B71: buffered_vfprintf (vfprintf.c:2326)
==18761==    by 0x90E972: vfprintf (vfprintf.c:1301)
==18761==    by 0x91915E: fprintf (fprintf.c:33)
==18761==    by 0x449AF72: SDL_LogOutput (SDL_log.c:624)
==18761==    by 0x449AEF1: SDL_LogMessageV_REAL (SDL_log.c:481)
==18761==    by 0x44C7445: SDL_LogMessageV (SDL_dynapi_procs.h:609)
==18761==    by 0x401C962: SDL_LogMessageV_REAL (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x404EB42: SDL_LogMessage (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x8094041: SDLTest_Log (in /tmp/sdl3/test/testautomation)
==18761==    by 0x8089A34: SDLTest_AssertPass (in /tmp/sdl3/test/testautomation)
==18761==  Address 0x4080a38 is 0 bytes inside a block of size 7 free'd
==18761==    at 0x4006CAF: free (vg_replace_malloc.c:446)
==18761==    by 0x457071B: real_free (SDL_malloc.c:5191)
==18761==    by 0x4570A1A: SDL_free_REAL (SDL_malloc.c:5340)
==18761==    by 0x44999FE: SDL_NukeFreeValue (SDL_hashtable.c:323)
==18761==    by 0x449986F: SDL_EmptyHashTable (SDL_hashtable.c:260)
==18761==    by 0x44998D6: SDL_DestroyHashTable (SDL_hashtable.c:273)
==18761==    by 0x449D204: SDL_FreePersistentStrings (SDL_utils.c:333)
==18761==    by 0x4575912: SDL_CleanupTLS_REAL (SDL_thread.c:125)
==18761==    by 0x457596A: SDL_QuitTLSData (SDL_thread.c:136)
==18761==    by 0x4497D50: SDL_QuitMainThread (SDL.c:268)
==18761==    by 0x44984C7: SDL_Quit_REAL (SDL.c:639)
==18761==    by 0x44C7CE0: SDL_Quit (SDL_dynapi_procs.h:657)
==18761== 
==18761== Invalid read of size 1
==18761==    at 0x93D13C: _IO_default_xsputn (genops.c:479)
==18761==    by 0x91294E: vfprintf (vfprintf.c:1641)
==18761==    by 0x913B71: buffered_vfprintf (vfprintf.c:2326)
==18761==    by 0x90E972: vfprintf (vfprintf.c:1301)
==18761==    by 0x91915E: fprintf (fprintf.c:33)
==18761==    by 0x449AF72: SDL_LogOutput (SDL_log.c:624)
==18761==    by 0x449AEF1: SDL_LogMessageV_REAL (SDL_log.c:481)
==18761==    by 0x44C7445: SDL_LogMessageV (SDL_dynapi_procs.h:609)
==18761==    by 0x401C962: SDL_LogMessageV_REAL (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x404EB42: SDL_LogMessage (in /tmp/sdl3/lib/libSDL2-2.0.so.0.3000.50)
==18761==    by 0x8094041: SDLTest_Log (in /tmp/sdl3/test/testautomation)
==18761==    by 0x8089A34: SDLTest_AssertPass (in /tmp/sdl3/test/testautomation)
==18761==  Address 0x4080a3a is 2 bytes inside a block of size 7 free'd
==18761==    at 0x4006CAF: free (vg_replace_malloc.c:446)
==18761==    by 0x457071B: real_free (SDL_malloc.c:5191)
==18761==    by 0x4570A1A: SDL_free_REAL (SDL_malloc.c:5340)
==18761==    by 0x44999FE: SDL_NukeFreeValue (SDL_hashtable.c:323)
==18761==    by 0x449986F: SDL_EmptyHashTable (SDL_hashtable.c:260)
==18761==    by 0x44998D6: SDL_DestroyHashTable (SDL_hashtable.c:273)
==18761==    by 0x449D204: SDL_FreePersistentStrings (SDL_utils.c:333)
==18761==    by 0x4575912: SDL_CleanupTLS_REAL (SDL_thread.c:125)
==18761==    by 0x457596A: SDL_QuitTLSData (SDL_thread.c:136)
==18761==    by 0x4497D50: SDL_QuitMainThread (SDL.c:268)
==18761==    by 0x44984C7: SDL_Quit_REAL (SDL.c:639)
==18761==    by 0x44C7CE0: SDL_Quit (SDL_dynapi_procs.h:657)
==18761== 

Yeah, it's the same problem. I'm on it.

Fixed, in libsdl-org/SDL@fe5dcf7, thanks!