On 03/07/2023 10:42, Daniel Fishman wrote:
Thanks for the pointer. I just commented out the line for the mentioned syscall number from valgrind's syscall table, and this workaround was enough to solve the problem. Since the custom syscall doesn't modify its parameters and doesn't seem to write anything in user space, it seems that writing a wrapper for it is not strictly necessary - or very useful for that matter, since in any case it won't be possible to submit a valgrind patch for the problem.
Well pread will be reading user memory so the wrapper would be checking that the memory it was given was valid, and that the file descriptor argument is valid. Not doing that won't break anything of course, it just means you may not detect some problems in your program.
Beyond this problem, maybe it could be useful if upon encountering an impossible problem (the one when valgrind writes: "valgrind: the 'impossible' happened"), valgrind will send a user to read the file README_MISSING_SYSCALL_OR_IOCTL in addition to telling him to read FAQ. Had I been aware of this file before, I would have known how to solve the problem myself.
Well sure, but the chances that a random SEGV in valgrind are caused by a syscall issue are probably less than 1% so doing that would mostly just be completely misleading. Tom -- Tom Hughes (t...@compton.nu) http://compton.nu/ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users