mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
6f8f606e05
2276: Fix segmentation fault when creating sql tables failed r=heinrich5991 a=Zwelf `GameServer()->OnShutdown(true);` (which would wait on running threads to exit) wasn't called if an error occured in the server init. Therefore `CServer` was freed before the init-thread finished executing, causing a use after free from `CSqlConnector::ms_ppSqlReadServers` pointing to `CServer->m_apSqlReadServers`. Fixes #2271 Note that the server exits when creating tables failed. Since the tables are created by default, it has to be disabled explicitly (e.g. `add_sqlserver r teeworlds record teeworlds PASSWORD "localhost" 3306 0`) if the servers should start even when the database connection fails. Co-authored-by: Zwelf <zwelf@strct.cc> |
||
---|---|---|
.. | ||
client | ||
docs | ||
external | ||
server | ||
shared | ||
antibot.h | ||
client.h | ||
config.h | ||
console.h | ||
demo.h | ||
editor.h | ||
engine.h | ||
friends.h | ||
ghost.h | ||
graphics.h | ||
input.h | ||
kernel.h | ||
keys.h | ||
map.h | ||
masterserver.h | ||
message.h | ||
server.h | ||
serverbrowser.h | ||
sound.h | ||
storage.h | ||
textrender.h | ||
updater.h | ||
uuid.h |