[LLVMbugs] [Bug 11394] New: valgrind: uninitialized in CompareImplicitConversionSequences

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 16 22:37:24 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11394

             Bug #: 11394
           Summary: valgrind: uninitialized in
                    CompareImplicitConversionSequences
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: Axel.Naumann at cern.ch
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Hi,

Valgrind reports an issue in the trunk (since at least a week):

// TString.h:
class TString {
   TString(const char *s);
   void Append(const char *cs) { Replace(0, 0, cs, 0); }
   void Replace(int pos, int n, const char *s, int ns);
   void Replace(int pos, int n1, const TString &s, int n2);
};

/usr/bin/valgrind /build/llvm-HEAD/inst/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
TString.h -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.21.53.20110810 -momit-leaf-frame-pointer -resource-dir
/build/llvm-HEAD/inst/bin/../lib/clang/3.1 -fmodule-cache-path
/var/tmp/clang-module-cache -fdeprecated-macro -fdebug-compilation-dir .
-ferror-limit 19 -fmessage-length 131 -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions
-fsyntax-only -I . -x c++ TString.h



==20845== Conditional jump or move depends on uninitialised value(s)
==20845==    at 0x180DDC9:
clang::CompareImplicitConversionSequences(clang::Sema&,
clang::ImplicitConversionSequence const&, clang::ImplicitConversionSequence
const&) (SemaOverload.cpp:2734)
==20845==    by 0x180D9BF: clang::isBetterOverloadCandidate(clang::Sema&,
clang::OverloadCandidate const&, clang::OverloadCandidate const&,
clang::SourceLocation, bool) (SemaOverload.cpp:6820)
==20845==    by 0x180E7CA:
clang::OverloadCandidateSet::BestViableFunction(clang::Sema&,
clang::SourceLocation, clang::OverloadCandidate*&, bool)
(SemaOverload.cpp:6912)
==20845==    by 0x181777A:
clang::Sema::BuildCallToMemberFunction(clang::Scope*, clang::Expr*,
clang::SourceLocation, clang::Expr**, unsigned int, clang::SourceLocation)
(SemaOverload.cpp:9559)
==20845==    by 0x171FBF9: clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, clang::ASTMultiPtr<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) (SemaExpr.cpp:3663)
==20845==    by 0x15C5631:
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) (ParseExpr.cpp:1313)
==20845==    by 0x15C8140: clang::Parser::ParseCastExpression(bool, bool,
bool&, bool) (ParseExpr.cpp:1149)
==20845==    by 0x15C48D9: clang::Parser::ParseCastExpression(bool, bool, bool)
(ParseExpr.cpp:421)
==20845==    by 0x15C3BE0: clang::Parser::ParseAssignmentExpression()
(ParseExpr.cpp:224)
==20845==    by 0x15C3AE8: clang::Parser::ParseExpression() (ParseExpr.cpp:178)
==20845==    by 0x157A91D:
clang::Parser::ParseExprStatement(clang::ParsedAttributes&) (ParseStmt.cpp:306)
==20845==    by 0x157A13F:
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) (ParseStmt.cpp:221)
==20845== 
==20845== Conditional jump or move depends on uninitialised value(s)
==20845==    at 0x180DDC9:
clang::CompareImplicitConversionSequences(clang::Sema&,
clang::ImplicitConversionSequence const&, clang::ImplicitConversionSequence
const&) (SemaOverload.cpp:2734)
==20845==    by 0x180D9BF: clang::isBetterOverloadCandidate(clang::Sema&,
clang::OverloadCandidate const&, clang::OverloadCandidate const&,
clang::SourceLocation, bool) (SemaOverload.cpp:6820)
==20845==    by 0x180E8A1:
clang::OverloadCandidateSet::BestViableFunction(clang::Sema&,
clang::SourceLocation, clang::OverloadCandidate*&, bool)
(SemaOverload.cpp:6926)
==20845==    by 0x181777A:
clang::Sema::BuildCallToMemberFunction(clang::Scope*, clang::Expr*,
clang::SourceLocation, clang::Expr**, unsigned int, clang::SourceLocation)
(SemaOverload.cpp:9559)
==20845==    by 0x171FBF9: clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, clang::ASTMultiPtr<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) (SemaExpr.cpp:3663)
==20845==    by 0x15C5631:
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) (ParseExpr.cpp:1313)
==20845==    by 0x15C8140: clang::Parser::ParseCastExpression(bool, bool,
bool&, bool) (ParseExpr.cpp:1149)
==20845==    by 0x15C48D9: clang::Parser::ParseCastExpression(bool, bool, bool)
(ParseExpr.cpp:421)
==20845==    by 0x15C3BE0: clang::Parser::ParseAssignmentExpression()
(ParseExpr.cpp:224)
==20845==    by 0x15C3AE8: clang::Parser::ParseExpression() (ParseExpr.cpp:178)
==20845==    by 0x157A91D:
clang::Parser::ParseExprStatement(clang::ParsedAttributes&) (ParseStmt.cpp:306)
==20845==    by 0x157A13F:
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) (ParseStmt.cpp:221)

Could someone have a look, please?

Cheers, Axel.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list