Review Request: C99 designated initializers (fix)

Ivan Shapovalov intelfx100 at gmail.com
Fri Apr 13 09:52:10 UTC 2012



> On April 13, 2012, 8:49 a.m., Alexandre Courbot wrote:
> > languages/cpp/parser/parser.cpp, line 2776
> > <http://git.reviewboard.kde.org/r/104557/diff/1/?file=56379#file56379line2776>
> >
> >     Unfortunately the parser seems to enter an infinite loop that allocates memory until it gets killed with I parse the Linux kernel with this. Inverting the true and false parameters seems to fix the issue, but this tends to indicate something can go terribly wrong in parseDesignatedInitializer. Any suggestion as to how I could figure out the faulty code that drives the parser crazy?
> 
> Ivan Shapovalov wrote:
>     Uhm.. I did not test it on the kernel code. Does the loop happen with true-then-false order or vice versa?
>     
>     Anyway, I will now attempt to trace the parser to see which rules actually create the loop body.
> 
> Alexandre Courbot wrote:
>     true-then-false makes the parser go wild when parsing the kernel. If you know of a good way to trace this, please tell me since I can easily reproduce the issue.

I was thinking to run KDevelop under the cachegrind profiler for a while and then use KCachegrind to find the most frequently called functions..
And, as a fallback method, (if cachegrind would be too slow) we may just set a couple of debug print statements in the beginning of each related parser rule.


- Ivan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104557/#review12383
-----------------------------------------------------------


On April 13, 2012, 1:18 a.m., Ivan Shapovalov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104557/
> -----------------------------------------------------------
> 
> (Updated April 13, 2012, 1:18 a.m.)
> 
> 
> Review request for KDevelop and Alexandre Courbot.
> 
> 
> Description
> -------
> 
> Fix of this patch:
> https://git.reviewboard.kde.org/r/103448
> 
> Passes unit-tests and "QString" testcase.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/parser/parser.h 64b5c50 
>   languages/cpp/parser/parser.cpp a45ee31 
>   languages/cpp/parser/tests/test_parser.h 2869d9d 
>   languages/cpp/parser/tests/test_parser.cpp 94e3ee0 
> 
> Diff: http://git.reviewboard.kde.org/r/104557/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ivan Shapovalov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120413/4d352f84/attachment.html>


More information about the KDevelop-devel mailing list