ddnet/src/engine
bors[bot] 6f8f606e05
Merge #2276
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>
2020-06-18 19:23:00 +00:00
..
client Don't miss dummy disconnects. Fix #2257 2020-06-11 13:33:08 +03:00
docs Fix typo 2018-07-10 17:29:02 +08:00
external Move DDNet-custom json code out of external directory (fixes #2022) 2020-01-01 20:07:04 +01:00
server Merge #2276 2020-06-18 19:23:00 +00:00
shared add sv_tele_others_auth_level 2020-06-14 19:21:12 +03:00
antibot.h Keep ticks going 2020-05-15 19:29:34 +03:00
client.h Send DDNet version early in the connection process 2020-05-22 17:58:41 +02:00
config.h dont restore empty config values at start 2015-11-16 20:31:56 +01:00
console.h Fix show_ips to show regular formatting (fixes #1873) 2019-08-01 20:24:30 +02:00
demo.h Allow larger map names 2020-06-18 18:29:27 +02:00
editor.h Notify about chat mentions in editor 2019-04-06 11:32:50 +02:00
engine.h Use two threads for the server thread pool 2018-10-07 12:47:32 +02:00
friends.h Add foes (permanently ignored players) 2015-07-22 22:16:49 +02:00
ghost.h Allow larger map names 2020-06-18 18:29:27 +02:00
graphics.h more typesafty in the graphics. introduced the IGraphics::CTextureHandle 2019-11-22 18:08:37 +01:00
input.h Refcount IME usage (fixes #577 and #738) 2017-07-15 15:25:36 +02:00
kernel.h Fix typo 2018-07-10 17:29:02 +08:00
keys.h Use scancodes instead of keycodes for input (fixes #796, please test) 2017-07-21 19:53:49 +02:00
map.h Allow larger map names 2020-06-18 18:29:27 +02:00
masterserver.h Fix a few whitespace-at-end-of-file issues 2015-08-22 15:27:41 +02:00
message.h fixed faulty message id 2020-01-19 21:30:12 +01:00
server.h Send DDNet version early in the connection process 2020-05-22 17:58:41 +02:00
serverbrowser.h Allow larger map names 2020-06-18 18:29:27 +02:00
sound.h Add option to enable/disable panning per voice 2014-11-30 12:23:05 +01:00
storage.h Increase MAX_PATH_LENGTH to support our own downloadedmaps names 2019-03-12 18:43:03 +01:00
textrender.h more typesafty in the graphics. introduced the IGraphics::CTextureHandle 2019-11-22 18:08:37 +01:00
updater.h Overhauled job system 2017-11-23 15:47:38 +01:00
uuid.h Add protocol extension with UUIDs 2017-05-25 00:52:43 +02:00