Review Request: Add some crash safety in templateresolver.cpp

Andreas Pakulat apaku at gmx.de
Fri Nov 2 14:19:33 UTC 2012


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


I'd say this is the wrong place to fix this, the function shouldn't even be called when the type is a 0-pointer.

- Andreas Pakulat


On Nov. 2, 2012, 11:06 a.m., Kevin Funk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107175/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2012, 11:06 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> Add some crash safety in templateresolver.cpp
> 
> Backtrace:
> 5  KDevelop::AbstractType::d_func (this=0x0) at
> /home/krf/devel/src/kdevplatform/language/duchain/types/abstracttype.h:284
> 6  0x00007f2bf466b4f9 in KDevelop::AbstractType::modifiers
> (this=<optimized out>) at
> /home/krf/devel/src/kdevplatform/language/duchain/types/abstracttype.cpp:52
> 7  0x00007f2bc646663b in isConstBased (type=...) at
> /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/templateresolver.cpp:47
> 8  0x00007f2bc6466e03 in
> Cpp::TemplateResolver::matchTemplateParameterTypesInternal
> (this=this at entry=0x7f2b651ce6f0, argumentType=..., parameterType=...,
> instantiatedTypes=..., res=...) at
> /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/templateresolver.cpp:277
> 9  0x00007f2bc6467365 in
> Cpp::TemplateResolver::templateHandlePointerType (this=0x7f2b651ce6f0,
> argumentType=..., parameterType=..., instantiatedTypes=..., res=...) at
> /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/templateresolver.cpp:151
> 10 0x00007f2bc6466d80 in
> Cpp::TemplateResolver::matchTemplateParameterTypesInternal
> (this=this at entry=0x7f2b651ce6f0, argumentType=..., parameterType=...,
> instantiatedTypes=..., res=...) at
> /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/templateresolver.cpp:270
> 11 0x00007f2bc646762c in
> Cpp::TemplateResolver::matchTemplateParameterTypes (this=0x7f2b651ce6f0,
> argumentType=..., parameterType=..., instantiatedTypes=...) at
> /home/krf/devel/src/kdevelop/languages/cpp/cppduchain/templateresolver.cpp:38
> (...)
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cppduchain/templateresolver.cpp 246bd31049d6a94e76f9188a827bc503c869923a 
> 
> Diff: http://git.reviewboard.kde.org/r/107175/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Funk
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121102/7cfb1ff7/attachment.html>


More information about the KDevelop-devel mailing list