[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#218636: Why is this a valgrind bug?

On Sun, 2003-11-02 at 10:53, Andrés Roldán wrote:
> Do you really think of this as a valgrind bug?

  Meanin' no disrespect, Mr. maintainer sir, but I do.  Userspace
programs aren't supposed to include kernel headers (see e.g.
http://kt.zork.net/kernel-traffic/kt20010618_122.html#2 ); they're
supposed to duplicate the parts of the kernel headers they need.  This
sort of problem is exactly why that's so.
  valgrind already does the right thing sometimes (though it still
includes a lot of kernel headers also); some kernel header info has been
copied into vg_kerneliface.h and is used from there.  IMO the ipc stuff
(and some ISDN stuff that's causing problems as well) should be copied
there.  I'd be happy to give you a patch if you like; I already prodded
the thing into working again on my system.

> valgrind went alright 
> until the latest libc6 was uploaded. I have already filed a bug against
> libc6 describing this problem (see Bug#218607). For example:
> In file included from vg_intercept.c:64:
> /usr/include/asm/ipc.h:10: error: field `__user' has incomplete type
> /usr/include/asm/ipc.h:10: error: parse error before '*' token
> /usr/include/asm/ipc.h:12: error: parse error before '}' token
> This error is solved by putting
>      #include <linux/compiler.h>
> on ipc.h.

  Yah, but is Linus really going to take a patch to fix valgrind
compilation?  If not, we're stuck keeping this patch (and whatever else
it turns out we need, for this or other programs) around until the end
of time.

  You guys are the experts, of course, but I really think this should be
fixed in valgrind.

Reply to: