|
From: Jeremy F. <je...@go...> - 2005-02-23 16:20:57
|
Tyler Nielsen wrote:
>I have been using valgrind on a program that makes use of USB ioctls.
>Up until now I've just been using hacks in the program to get around the
>uninitialized memory complaints. I finally sat down and started to put
>the code into valgrind so it understands the ioctls. I have been
>successful, and have a build of valgrind that handles all the ioctls I
>use correctly. However now I'm trying to get it into a state so that I
>can submit a patch for it, and there is one circumstance that I don't
>know how to deal with. Basically one ioctl affects the memory written
>to by the next ioctl. Attached is the patch needed for these ioctls to
>work. The question is, is this the correct way to handle this, or is
>there a better way.
>
No, this definitely isn't correct. Not threadsafe for one thing. What
is the URB pointer state associated with? The file descriptor? An
underlying device?
A more general comment is that I'd really like to come up with a way of
dealing with ioctls which doesn't require adding more stuff into
vg_unsafe.h, and doesn't require duplicating structures into vki*.h.
J
|