This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Big-endian Gcc on Intel IA32
- From: Jason Riedy <ejr at CS dot Berkeley dot EDU>
- To: Linus Torvalds <torvalds at transmeta dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 18 Dec 2001 11:53:06 -0800
- Subject: Re: Big-endian Gcc on Intel IA32
And Linus Torvalds writes:
-
- And I suspect some people might want to use it not as a "taint" bit, but
- simply as a way to have a mechanism to strengthen the C type system.
There's some interesting UCB research in type qualifiers in
general. One specific target has been checking tainting,
and another has been locking in Linux. The tool works on
pre-processed code, and it can take quite a lot of memory
when analyzing across multiple files.
tool: http://www.cs.berkeley.edu/Research/Aiken/cqual/
(older version; Jeff may provide a newer, experimental
one on request if he has time)
tainting: http://www.cs.berkeley.edu/~jfoster/papers/usenix01.ps.gz
locking: http://www.cs.berkeley.edu/~jfoster/papers/pldi02-flow.pdf
The most relevant observation: Doing this properly (i.e.
few to no false positives) requires polymorphic qualifiers.
The "taint" has to pass through functions silently. Treating
it just like "const" _does_ yield too many false positives.
So for this to be useful, you'll need more than what gcc
currently provides.
Providing polymorphic machinery for general gcc front-ends
would take a good amount of work. IIRC, Perl's data tainting
is essentially a dynamic type tag. Polymorphism is a static
type system's way of avoiding the dynamic tag. (One view of
polymorphism, that is.)
Jason