Re: [PATCH] C undefined behavior fix

From: Richard Henderson (rth@redhat.com)
Date: Wed Jan 02 2002 - 20:12:24 EST


On Wed, Jan 02, 2002 at 05:16:05PM -0700, Tom Rini wrote:
> > Ignore strcpy. Yes, that's what visibly causing a failure here,
> > but the bug is in the funny pointer arithmetic. Leave that in
> > there and the compiler _will_ bite your ass sooner or later.
>
> Er, which part of the 'funny pointer arithmetic'?

What's currently inside RELOC.

> We need to do funny things here, and thus need a way to tell gcc to just
> do what we're saying.

While it's true that you have requirements on doing runtime
relocation, what you absolutely do not want to do is expose
this to gcc.

Hide it inside inline assembly if you must. Better is to
do your relocation before you enter C at all.

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:19 EST