================================================================= ==24871==ERROR: AddressSanitizer: heap-use-after-free on address 0x7f4ed2716800 at pc 0x55e3fbf89c1f bp 0x7fff89ed0270 sp 0x7fff89ed0268 READ of size 1 at 0x7f4ed2716800 thread T0 #0 0x55e3fbf89c1e in CCollision::GetTile(int, int) const /home/chiller/Desktop/git/ddnet/src/game/collision.cpp:286:19 #1 0x55e3fb5a181d in CPlayers::OnRender() /home/chiller/Desktop/git/ddnet/src/game/client/components/players.cpp:748:47 #2 0x55e3fb6ef65b in CGameClient::OnRender() /home/chiller/Desktop/git/ddnet/src/game/client/gameclient.cpp:646:15 #3 0x55e3fab6c127 in CClient::Render() /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:1213:16 #4 0x55e3fabbd834 in CClient::Run() /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:3291:7 #5 0x55e3fac17158 in main /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:4770:11 #6 0x7f4f1774c84f (/usr/lib/libc.so.6+0x2384f) (BuildId: 2f005a79cd1a8e385972f5a102f16adba414d75e) #7 0x7f4f1774c909 in __libc_start_main (/usr/lib/libc.so.6+0x23909) (BuildId: 2f005a79cd1a8e385972f5a102f16adba414d75e) #8 0x55e3fa5cf904 in _start (/home/chiller/Desktop/git/ddnet/build-headless/DDNet+0x10d1904) (BuildId: 51c04efdafb0da6da21e558eba479f5d2207b373) 0x7f4ed2716800 is located 0 bytes inside of 4054900-byte region [0x7f4ed2716800,0x7f4ed2af4774) freed by thread T0 here: #0 0x55e3fa685e82 in __interceptor_free.part.0 (/home/chiller/Desktop/git/ddnet/build-headless/DDNet+0x1187e82) (BuildId: 51c04efdafb0da6da21e558eba479f5d2207b373) #1 0x55e3fbdf7476 in CDataFileReader::Close() /home/chiller/Desktop/git/ddnet/src/engine/shared/datafile.cpp:476:3 #2 0x55e3fbe698a5 in CMap::Unload() /home/chiller/Desktop/git/ddnet/src/engine/shared/map.cpp:47:13 #3 0x55e3fab5ba16 in CClient::DisconnectWithReasonImpl(char const*) /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:857:10 #4 0x55e3fabbe254 in CClient::Run() /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:3311:4 #5 0x55e3fac17158 in main /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:4770:11 #6 0x7f4f1774c84f (/usr/lib/libc.so.6+0x2384f) (BuildId: 2f005a79cd1a8e385972f5a102f16adba414d75e) previously allocated by thread T0 here: #0 0x55e3fa686e99 in malloc (/home/chiller/Desktop/git/ddnet/build-headless/DDNet+0x1188e99) (BuildId: 51c04efdafb0da6da21e558eba479f5d2207b373) #1 0x55e3fbdf8e19 in CDataFileReader::GetDataImpl(int, int) /home/chiller/Desktop/git/ddnet/src/engine/shared/datafile.cpp:283:47 #2 0x55e3fbdfa1fd in CDataFileReader::GetData(int) /home/chiller/Desktop/git/ddnet/src/engine/shared/datafile.cpp:319:9 #3 0x55e3fbe68ceb in CMap::GetData(int) /home/chiller/Desktop/git/ddnet/src/engine/shared/map.cpp:10:20 #4 0x55e3fbfd0bd3 in CLayers::InitTilemapSkip() /home/chiller/Desktop/git/ddnet/src/game/layers.cpp:200:38 #5 0x55e3fbfcfdb2 in CLayers::Init(IKernel*) /home/chiller/Desktop/git/ddnet/src/game/layers.cpp:125:2 #6 0x55e3fb6d6b5b in CGameClient::OnConnected() /home/chiller/Desktop/git/ddnet/src/game/client/gameclient.cpp:480:11 #7 0x55e3fab7c817 in CClient::ProcessServerPacket(CNetChunk*, int, bool) /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:1814:18 #8 0x55e3fab98497 in CClient::PumpNetwork() /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:2574:4 #9 0x55e3faba9a51 in CClient::Update() /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:2855:2 #10 0x55e3fabba6e4 in CClient::Run() /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:3217:4 #11 0x55e3fac17158 in main /home/chiller/Desktop/git/ddnet/src/engine/client/client.cpp:4770:11 #12 0x7f4f1774c84f (/usr/lib/libc.so.6+0x2384f) (BuildId: 2f005a79cd1a8e385972f5a102f16adba414d75e) SUMMARY: AddressSanitizer: heap-use-after-free /home/chiller/Desktop/git/ddnet/src/game/collision.cpp:286:19 in CCollision::GetTile(int, int) const Shadow bytes around the buggy address: 0x0fea5a4dacb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0fea5a4dacc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0fea5a4dacd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0fea5a4dace0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0fea5a4dacf0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0fea5a4dad00:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fea5a4dad10: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fea5a4dad20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fea5a4dad30: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fea5a4dad40: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fea5a4dad50: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==24871==ABORTING