Open joneschrisg opened 11 years ago
The ultimate solution is probably to have the supervisor process catch the signal, see that it was triggered by the syscall-buffers code, and fix everything up.
This bug can be deferred of course.
I just came across a cute trick: apparently msync()
ing a (page-aligned) pointer can incidentally be used to tell if that page is mapped, whether or not it's backed by a file. I agree that it would still be better (i.e. faster in the common case) to handle bad pointers by trapping to rr.
This doesn't appear to be much of a problem in practice.
If any memory we try to record happens to be inaccessible, then the tracee will crash. Usually bad memory results in EFAULT or EINVAL being spit out. We can probably avoid changing semantics in most cases by being more careful, but it might be preferable to just defer to the
--sound
(i.e. slow) mode that's been proposed before.