This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH]: Proof-of-concept for dynamic format checking
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Ian Lance Taylor'" <ian at airs dot com>,"'Giovanni Bajo'" <giovannibajo at libero dot it>
- Cc: "'Florian Weimer'" <fw at deneb dot enyo dot de>,"'Joseph S. Myers'" <joseph at codesourcery dot com>,<gcc at gcc dot gnu dot org>,<ghazi at caipclassic dot rutgers dot edu>
- Date: Thu, 18 Aug 2005 12:56:36 +0100
- Subject: RE: [PATCH]: Proof-of-concept for dynamic format checking
----Original Message----
>From: Ian Lance Taylor
>Sent: 18 August 2005 02:20
> "Giovanni Bajo" writes:
>
>> Florian Weimer wrote:
>>
>>> Can't we just use some inline function written in plain C to check the
>>> arguments and execute it at compile time using constant folding etc.?
>>
>>
>> Do we have a sane way to (partially) execute optimizers at -O0 without
>> screwing up with the pass manager too much? Probably they can be talked
>> into, but might require some work. The idea is neat though, and I prefer
>> it over introducing a specific pattern-matching language (which sounds
>> like over-engineering for such a side feature).
>
> I suppose I have the reverse opinion about which one is over-
> engineering, but that's probably just me. Remember that it's not
> enough simply to execute the optimizers. You have to build a symbol
> table and an environment for the code to execute in.
>
> Another approach would be to dlopen a shared library to do format
> checking. There might be some security implications to that, though.
PMFBI, but how is all this going to work on a cross compiler?
cheers,
DaveK
--
Can't think of a witty .sigline today....