Skip to content

Valgrind warning on LLVM 3.6 and 3.7 #10806

@garrison

Description

@garrison

I put the following in Make.user

LLVM_VER = 3.6.1
CFLAGS = -DMEMDEBUG

then build and run under valgrind

make cleanall && make && valgrind --smc-check=all-non-file --suppressions=contrib/valgrind-julia.supp ./julia -e ""

It reports the following memory error:

==28214== Conditional jump or move depends on uninitialised value(s)
==28214==    at 0x532E973: llvm::DwarfCompileUnit::addRange(llvm::RangeSpan) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x5302D51: llvm::DwarfDebug::endFunction(llvm::MachineFunction const*) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x52EDF16: llvm::AsmPrinter::EmitFunctionBody() (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x5078CA2: llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x5986A1E: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x5988E12: llvm::legacy::PassManagerImpl::run(llvm::Module&) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x5354B6C: llvm::MCJIT::emitObject(llvm::Module*) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x53550C5: llvm::MCJIT::generateCodeForModule(llvm::Module*) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x53530B0: llvm::MCJIT::getSymbolAddress(std::string const&, bool) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x53531A8: llvm::MCJIT::getFunctionAddress(std::string const&) (in /home/garrison/julia/usr/lib/libjulia.so)
==28214==    by 0x4F7A282: jl_generate_fptr (codegen.cpp:734)
==28214==    by 0x4F4D24C: jl_trampoline_compile_function (builtins.c:998)
==28214==    by 0x4F4D24C: jl_trampoline (builtins.c:1009)

I have only been able to reproduce this with LLVM 3.6 and svn/3.7 (not 3.3 or 3.5). I have not tested with LLVM-svn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions