mozilla/rr — pull request #1348 by froydnj (2014-10-17 19:32:58+00:00)
Title: x86-64 recording fixes, part 3

Basic support for a few more networking syscalls. `msgrcv(2)` is the big remaining one.

Sadly, the new support for networking syscalls doesn't work very well on x86-64; the `accept` test doesn't pass, because `socket(2)` doesn't return the same file descriptors in record vs. replay. It looks like the perf event fds are staying open (?) in the recording process; at the very least, I see in the recorded process's `/proc/$PID/fd/` directory:

```
0 -> /dev/pts/2
1 -> /dev/pts/2
2 -> /dev/pts/2
3 -> anon_inode:[perf_event]
4 -> socket:[...]
5 -> socket:[...]
```

and fd 3 doesn't exist during replay, which throws things off. But debugging `PerfCounters`, it looks like the fds that we get back from `__NR_perf_event_open` shouldn't be interfering--numerically, at least--with the fds from `open` and `socket` and the like. I don't understand what's going wrong here.