select(2) regression?

From: Paul Floyd <paulf2718_at_gmail.com>
Date: Mon, 22 Sep 2025 11:13:48 UTC
Hi

I'm testing Valgrind to try to get it ready for 15.0-RELEASE. I've 
seeing several new issues. Here is the first one.

In one testcase this code

    for (i = 0; i < loops; i++) {
       if (sleepms > 0 && s->sleep) {
          t[s->t].tv_sec = sleepms / 1000;
          t[s->t].tv_usec = (sleepms % 1000) * 1000;
          ret = select (0, NULL, NULL, NULL, &t[s->t]);
          /* We only expect a timeout result or EINTR from the above. */
          if (ret != 0 && errno != EINTR)
             perror("unexpected result from select");
       }
       if (burn > 0 && s->burn)
          do_burn();
    }

is failing with the select call returning 93. I don't see how that is 
possible with 0 nfds and empty fd sets. Note that the problem is in vgdb 
which is a plain C exe not running under Valgrind. I'll see if I can 
make a smaller reproducer. This is on amd64. It looks like a regression 
to me - select worked as expected as far as I can remember going back to 
FreeBSD 10.

A+

Paul