[CMake] Re: dangerous regex in CHECK_C_SOURCE_COMPILES
Brandon Van Every
bvanevery at gmail.com
Tue Nov 13 21:36:04 EST 2007
On Nov 13, 2007 6:28 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>
> Brandon Van Every wrote:
> > On Nov 13, 2007 3:35 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> >> A variable name should not contain special characters anyway.
> >
> > That, however, is not error checking or safety. That's hope. I
> > haven't synthesized an example that will kill CMake in the real world.
> > At some point I will do so and enter it in the bug tracker, with
> > whatever level of severity it is worth.
> >
> >
>
> OK, so if you call the macro with incorrect arguments you will get the
> wrong answer, and some error about a bad regular expression. However, I
> think that even if we did not use the MATCH thing for DEFINED, you would
> still get some really odd error, if you pass a variable name into a
> macro, that is not a valid variable name. Again, can you come up with
> an example of this? I just want to try the example against the "fix",
> and my guess is the results will not be much better than what we have now.
I don't have time for this at present but I will attempt to synthesize
a worst case in the future.
Cheers,
Brandon Van Every
More information about the CMake
mailing list