Comment 13 for bug 473173

Revision history for this message
Razzloss (razzloss) wrote :

The patch looks ok.

Plain mmap call shouldn't cause SIGBUS, it should return an error if the file can't be mapped.

I was going to say that we could move the sigsetjmp to before the loop even begins (just to be safe and save some cpu cycles), but it probably should stay where it is. Sigsetjmp man page states that the stack context is saved at the time of the call. That includes the buf-variable, which we cannot unmap if context is set before mmap.

--RZ