[cfe-commits] Failed test

Anton Korobeynikov anton at korobeynikov.info
Thu Dec 25 16:50:30 PST 2008

Hello, Everyone

test/Codegen/struct.c fails on x86-64/linux due to memory corruption:

 $ valgrind ../clang -emit-llvm struct.c 
==11730== Memcheck, a memory error detector.
==11730== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
==11730== Using LibVEX rev 1854, a library for dynamic binary
==11730== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==11730== Using valgrind-3.3.1, a dynamic binary instrumentation
==11730== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
==11730== For more details, rerun with: -v
struct.c:159:28: error: cannot codegen this l-value expression yet
  a13 b = __builtin_va_arg(l, a13);
struct.c:159:11: error: cannot codegen this aggregate va_arg expression
  a13 b = __builtin_va_arg(l, a13);
==11730== Invalid read of size 8
==11730==    at 0xAF35CE: llvm::PATypeHolder::get() const (Type.h:406)
==11730==    by 0xAF361A: llvm::PATypeHolder::operator llvm::Type*()
const (AbstractTypeUser.h:149)
==11730==    by 0xAF3636: llvm::Value::getType() const (Value.h:88)
==11730==    by 0xF49668:
llvm::Value*, clang::QualType) (CGExprAgg.cpp:502)
==11730==    by 0xF4B048: (anonymous
==11730==    by 0xF4BCAB: clang::StmtVisitor<(anonymous
namespace)::AggExprEmitter, void>::Visit(clang::Stmt*)
==11730==    by 0xF4BFE9:
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*,
llvm::Value*, bool) (CGExprAgg.cpp:485)
==11730==    by 0xF4009F:
const&) (CGDecl.cpp:216)
==11730==    by 0xF40292:
clang::CodeGen::CodeGenFunction::EmitBlockVarDecl(clang::VarDecl const&)
==11730==    by 0xF4033D:
clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&)
==11730==    by 0xF7DA92:
clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&)
==11730==    by 0xF7E56F:
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*)
==11730==  Address 0x10 is not stack'd, malloc'd or (recently) free'd

With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.

More information about the cfe-commits mailing list