kdev-clang patch

Gustaw Smolarczyk wielkiegie at gmail.com
Tue Aug 4 18:35:24 UTC 2015


Hi Kevin,

I have already completely rewritten the code that was crashing without
saving it anywhere first. After some trials I have reproduced it in as
small example as possible. I think that the original bug was slightly
different, but since this one crashes too that should be ok for now.

To reproduce, try typing anything inside the GrandChild class. This will
trigger the completion visitor that will crash (or at least should cause
undefined behaviour). I checked this by adding an if condition that screams
if there was an attempt to read from info->templateTypes past the end of
its size.

It seems to be caused by multiple layers of templates.

Regards,
Gustaw

2015-08-04 0:22 GMT+02:00 Kevin Funk <kfunk at kde.org>:
>
> On Saturday 18 July 2015 22:51:01 Gustaw Smolarczyk wrote:
> > Hello,
> >
> > I am not really sure how I should provide it, but here is a patch of
mine.
> > It fixes two bugs in kdev-clang (well, one of the "fixes" just prevents
the
> > SIGSEGV). I am using llvm/clang from git, so the problem I was seeing
may
> > only be visible on latest clang code.
> >
> > Regards,
> > Gustaw Smolarczyk
>
> @Gustav, when do you see this SIGSEGV? Which code base is involved? Can
you
> provide a MWE (https://en.wikipedia.org/wiki/Minimal_Working_Example)
>
> Your help is appreciated!
>
> Cheers
>
> --
> Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150804/52435e5b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdev-clang-crash.cpp
Type: text/x-c++src
Size: 139 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150804/52435e5b/attachment.cpp>


More information about the KDevelop-devel mailing list