r201000 - Fold together two repeated identical 'if's.

Nick Lewycky nlewycky at google.com
Fri Feb 7 16:50:15 PST 2014


On 7 February 2014 16:46, Richard Smith <richard at metafoo.co.uk> wrote:

> I've had a look and I can't reproduce the failures locally (not even under
> valgrind). Still investigating...
>

It appears to require building with GCC -O1 (or at least, not -O0).
Valgrind says:

*==28558== Use of uninitialised value of size 8*
==28558==    at 0x221B3A2:
llvm::FoldingSetImpl::FindNodeOrInsertPos(llvm::FoldingSetNodeID const&,
void*&) (third_party/llvm/llvm/lib/Support/FoldingSet.cpp:286)
==28558==    by 0x121136D:
clang::ASTContext::getFunctionType(clang::QualType,
llvm::ArrayRef<clang::QualType>, clang::FunctionProtoType::ExtProtoInfo
const&) const (third_party/llvm/llvm/include/llvm/ADT/FoldingSet.h:531)
==28558==    by 0xEF9066:
clang::Sema::DeclareGlobalAllocationFunction(clang::DeclarationName,
clang::QualType, clang::QualType, clang::QualType, bool)
(third_party/llvm/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp:2101)
==28558==    by 0xEF9510: clang::Sema::DeclareGlobalNewDelete()
(third_party/llvm/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp:2019)
==28558==    by 0xEFE054:
clang::Sema::FindAllocationFunctions(clang::SourceLocation,
clang::SourceRange, bool, clang::QualType, bool,
llvm::MutableArrayRef<clang::Expr*>, clang::FunctionDecl*&,
clang::FunctionDecl*&)
(third_party/llvm/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp:1658)
==28558==    by 0xF0A876: clang::Sema::BuildCXXNew(clang::SourceRange,
bool, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::SourceRange, clang::QualType,
clang::TypeSourceInfo*, clang::Expr*, clang::SourceRange, clang::Expr*,
bool) (third_party/llvm/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp:1404)
==28558==    by 0xF0BA9B: clang::Sema::ActOnCXXNew(clang::SourceLocation,
bool, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::SourceRange, clang::Declarator&,
clang::Expr*)
(third_party/llvm/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp:1125)
==28558==    by 0xCC83D2: clang::Parser::ParseCXXNewExpression(bool,
clang::SourceLocation)
(third_party/llvm/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp:2576)
==28558==    by 0xCD2E42: clang::Parser::ParseCastExpression(bool, bool,
bool&, clang::Parser::TypeCastState)
(third_party/llvm/llvm/tools/clang/lib/Parse/ParseExpr.cpp:1100)
==28558==    by 0xCD3170: clang::Parser::ParseCastExpression(bool, bool,
clang::Parser::TypeCastState)
(third_party/llvm/llvm/tools/clang/lib/Parse/ParseExpr.cpp:417)
==28558==    by 0xCD323C:
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(third_party/llvm/llvm/tools/clang/lib/Parse/ParseExpr.cpp:169)
==28558==    by 0xCECC59:
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&)
(third_party/llvm/llvm/tools/clang/include/clang/Parse/Parser.h:1484)
*==28558==  Uninitialised value was created by a stack allocation*
==28558==    at 0xEF8A27:
clang::Sema::DeclareGlobalAllocationFunction(clang::DeclarationName,
clang::QualType, clang::QualType, clang::QualType, bool)
(third_party/llvm/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp:2044)

Nick


> On Fri, Feb 7, 2014 at 4:07 PM, Renato Golin <renato.golin at linaro.org>wrote:
>
>> On 7 February 2014 22:39, Richard Smith <richard-llvm at metafoo.co.uk>
>> wrote:
>> > URL: http://llvm.org/viewvc/llvm-project?rev=201000&view=rev
>> > Log:
>> > Fold together two repeated identical 'if's.
>>
>>
>> hi Richard,
>>
>> Doesn't look like your commit broke it, but do you mind having a look?
>>
>> http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/15596
>>
>> cheers,
>> -renato
>>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140207/145f3c2f/attachment.html>


More information about the cfe-commits mailing list