[cmake-developers] QtAutogen 3.6.0 directory nesting overflow patch
Sebastian Holtermann
seblist at xwmw.org
Mon Aug 8 16:19:39 EDT 2016
Am 08.08.2016 um 19:40 schrieb Brad King:
> On 08/06/2016 09:42 AM, Sebastian Holtermann wrote:
>> Ok, here is a new set of patches based on the current git master branch.
>
> Thanks!
>
>> + outStream << "#include \""
>> + << cmsys::SystemTools::ConvertToOutputPath(it->second)
>> + << "\"\n";
>
> The ConvertToOutputPath method may also add its own double quotes.
> It is not just about slash conversion. Please use another approach
> to convert slashes. I dropped this patch for now.
Ok, I just checked
http://stackoverflow.com/questions/5790161/is-the-backslash-acceptable-in-c-and-c-include-directives
It is even invalid to use backslashes in an #include statements.
The paths are generated with a forward slash
so it should be good to just use them as they are.
> Meanwhile I've applied the rest:
>
> cmFilePathUuid: Add class to generate deterministic unique file names
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecb6df52
>
> QtAutogen: Use std:: instead of ::std::
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06217388
>
> QtAutogen: Allow multiple moc files with the same name
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e2cd04b
>
> QtAutogen: Allow multiple qrc files with the same name
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71d0308a
>
> Tests/QtAutogen: Test same moc/qrc source names in different directories
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20f0028c
>
> and merged to `next` for testing.
Great, thanks.
> One of the problems reported in
>
> https://gitlab.kitware.com/cmake/cmake/issues/16209
>
> with the previous approach was that the symbol name created by autorcc
> changed from what it was in CMake <= 3.5. Is it now preserved?
It is back to what it was in 3.5 for the all-qrc-names-unique case.
So yes, existing projects get the same symbol name they used to get.
New projects that now can use non unique file names
may get a symbol name based on the checksum extended file name
- but that one is also length limited and should be safe.
But I found another issue.
The checksum string generator may generate a '-' in the file name.
This is allowed for file names but not for symbol names.
I have attached a small patch to fix this.
-Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-QtAutogen-Replace-invalid-character-for-symbol-names.patch
Type: text/x-patch
Size: 923 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160808/9544d20f/attachment.bin>
More information about the cmake-developers
mailing list