[PATCH] Fix stack overflow in MSVC unqualified type lookup logic

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue May 31 09:39:39 PDT 2016


Thanks for the patch and report!

Can this check be defeated with mutually recursive class template
inheritance? I was thinking something like this:

...
template <typename T, typename X>
struct FooWrapper : FooTemplated<T, X> { };

// Full template spec
template <class T, class X>
class FooTemplated : public FooWrapper<T, Bar> {
...

Maybe we should use a set of visited RDs?

On Fri, May 27, 2016 at 9:56 PM, Will Wilson <will at indefiant.com> wrote:

> Hi Alexey,
>
> A customer encountered a stack overflow in the code from r229817. I've
> created a small repro for testing the issue and a fix. The fix should also
> better deal with lookup into partially specialized base templates.
>
> Test case included and tested against latest trunk.
>
> Let me know if it looks acceptable!
>
> Cheers,
> Will.
>
> --
> *Indefiant *: http://www.indefiant.com
> Home of Recode : Runtime C++ Editing for VS
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160531/bb0d539f/attachment.html>


More information about the cfe-commits mailing list