Skip to content

valgrind error at CodeGenModule.cpp:2531 #94661

@dcb314

Description

@dcb314

From the clang testsuite, file ./Analysis/analysis-after-multiple-dtors.cpp
does this with a valgrind version of recent clang:

test $ valgrind -q --trace-children=yes ~/llvm/results/bin/clang++ -c -w ./Analysis/analysis-after-multiple-dtors.cpp
==424675== Conditional jump or move depends on uninitialised value(s)
==424675== at 0x2429FF9: clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(clang::Decl const*, llvm::Function*) (CodeGenModule.cpp:2531)
==424675== by 0x26F5B23: clang::CodeGen::CodeGenModule::codegenCXXStructor(clang::GlobalDecl) (CGCXX.cpp:216)

The source code line in error is

if (isa<CXXMethodDecl>(D) && F->getPointerAlignment(getDataLayout()) < 2)

The bug first seems to occur sometime between git hash 1579e9c and 8364659.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions