Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-14253

Crash on auto type deduction with debug output enabled

XMLWordPrintable

    • f27aa09ac52e572119da6e8d86e38cb96bed2985

      set QTC_LOOKUPCONTEXT_DEBUG=1

      Run qtcreator -test CppTools,test_completion:direct_nested_template_type_access

      It crashes.

      The problem is that in ResolveExpression::visit(SimpleNameAST *ast) a temporary document is created, and when it is destroyed with its control, the template name that was stored in the binding is destroyed with it, leaving a dangling pointer.

      This might affect other use-cases even when debugging is disabled, since this name is stored in ClassOrNamespace::_templateId.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            orgads Orgad Shaneh
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes