On 04/09/13 09:38, Tim Ruehsen wrote:
Very well, if this would be possible. Right now I have no idea how to print
something like the above. I made Tomas Hozza's test with valgrind and wget
having debug info. I got 18x (out of 20x) SIGBUS, but on completely different
places in the code. Within the misuse test situation, SIGBUS could occur at
any place where memory access (read or write) allocated by wget_read_file().
Absolutely randomly / unpredictable if an outside process changes the file
size and/or content at the same time.

And SIGBUS could also occur out of any other reason (e.g. real bugs in Wget).
Yes, that would be a bit hard.
I suspect it could be possible (on some systems) by setting the handler with SA_SIGINFO and checking whether the si_addr member of the siginfo_t argument falls inside the
memory area we allocated for a file.
Probably not worth the code complexity. :)


Reply via email to