Looking over the timer code, the do_pending_atimers function does:

      block_atimers ();
      run_timers ();
      unblock_atimers ();

The last line of run_timers is:

  set_alarm ();

But what happens if the next timer happens to be soon, and Emacs
receives SIGALRM inbetween set_alarm and unblock_timers?

What is the purpose of sigmasking SIGALRM anyway? If it means to block
SIGALRM during timers, that doesn't always happen because timers run
within timers. The end of an inner timer would unblock SIGALRM and
the outer timer would finish with the sigmask unblocked.