On Tuesday 03 September 2013 03:48:15 Tomas Hozza wrote:
> > BTW, read() instead of mmap() would not help in this case.
> 
> It would eliminate the SIGBUS because the length of the file
> is determined from the number of read bytes by read(). This way
> we might end up with truncated file, but will not try to access
> the memory where we shouldn't.

In this case, the (or some) links couldn't be followed and the test could have 
succeeded without doing the expected action. The tester maybe wouldn't have 
recognized the fault. In your special case, the tester maybe would not mind, 
but in general it is a good idea not to suppress errors or misbehavior, just 
to make people feel better.

Regards, Tim

Reply via email to