Summary: | sendmsg syscall should ignore unset msghdr msg_flags | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Mark Wielaard <mark> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tom |
Priority: | NOR | ||
Version: | 3.9.0.SVN | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
sendmsg-syscall-should-ignore-unset-msghd.patch
sendmsg-syscall-should-ignore-unset-msghd.patch |
Description
Mark Wielaard
2013-02-19 10:34:01 UTC
Created attachment 77422 [details]
sendmsg-syscall-should-ignore-unset-msghd.patch
coregrind/m_syswrap/syswrap-generic.c patch and memcheck/tests testcase
That patch disables a whole load of checking that we do want though - it's not only flags that have "read" set to false but also things like the address in msg_name and the actual data in the iov. The "read" argument tells you only one thing - whether that field is read or written (there is no option for ignored) and only for recvmsg. There is no equivalent for sendmsg. We probably need to rename it and add an extra field so that we have separate read/written/ignored flags for recv and send. Created attachment 77489 [details] sendmsg-syscall-should-ignore-unset-msghd.patch (In reply to comment #2) > That patch disables a whole load of checking that we do want though - it's > not only flags that have "read" set to false but also things like the > address in msg_name and the actual data in the iov. > > The "read" argument tells you only one thing - whether that field is read or > written (there is no option for ignored) and only for recvmsg. There is no > equivalent for sendmsg. Doh. Sorry, missed that. How about this alternative patch? I extended the testcase to show a case (forgetting to set msg_name) that was missed by my earlier patch, but properly caught by this one. Committed as r13294. |