// trying to set client name can delete the player object, check if it still exists
static int dummy = (some_function(), 0);
is what I've seen a few times To enable continue-after-error, compile with -fsanitize-recover=address and then run your code with ASAN_OPTIONS=halt_on_error=0.