[cfe-dev] intermittent lit failure: clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp

Johnson, Troy via cfe-dev cfe-dev at lists.llvm.org
Fri Apr 3 12:54:16 PDT 2020


The accessor can return null intermittently?  Why?

-Troy
________________________________
From: Saar Raz <saar at raz.email>
Sent: Friday, April 3, 2020 2:48 PM
To: Johnson, Troy <troy.johnson at hpe.com>
Cc: Richard Smith <richard at metafoo.co.uk>; Clang Dev <cfe-dev at lists.llvm.org>
Subject: Re: [cfe-dev] intermittent lit failure: clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp

Hey,
Didn't reproduce yet but I know how to fix the issue. That accessor can return null and there should be a null check there.
I'll push a fix as soon as I can.
Thanks!

On Fri, Apr 3, 2020, 10:23 PM Johnson, Troy <troy.johnson at hpe.com<mailto:troy.johnson at hpe.com>> wrote:
Has anyone tried to reproduce this yet?

Thanks,
Troy
________________________________
From: Richard Smith <richard at metafoo.co.uk<mailto:richard at metafoo.co.uk>>
Sent: Tuesday, March 24, 2020 5:46 PM
To: Johnson, Troy <troy.johnson at hpe.com<mailto:troy.johnson at hpe.com>>; Saar Raz <saar at raz.email>
Cc: cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org> <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>
Subject: Re: [cfe-dev] intermittent lit failure: clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp

+Saar for all things concepts.

On Tue, 24 Mar 2020 at 13:23, Johnson, Troy via cfe-dev <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>> wrote:
The test fails about 1 in 10 or 20 runs when I execute it via llvm-lit repeatedly in a shell loop.  It encounters a null pointer dereference in this code in clang/lib/AST/StmtProfile.cpp:

void StmtProfiler::VisitConceptSpecializationExpr(
                                           const ConceptSpecializationExpr *S) {
  VisitExpr(S);
  VisitDecl(S->getFoundDecl());
  VisitTemplateArguments(S->getTemplateArgsAsWritten()->getTemplateArgs(),
                         S->getTemplateArgsAsWritten()->NumTemplateArgs);
}

The S->getTemplateArgsAsWritten() call returns null.

I have not been able to determine why the behavior is intermittent.  Is there someone more familiar with this code who has an idea?

-Troy
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200403/f5d1aa28/attachment-0001.html>


More information about the cfe-dev mailing list