[llvm-bugs] [Bug 40547] New: Clang fails to pass validation when compiled with gcc-9 in release build.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 31 08:31:36 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40547

            Bug ID: 40547
           Summary: Clang fails to pass validation when compiled with
                    gcc-9 in release build.
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: serge.guelton at telecom-bretagne.eu
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Building clang 8.0.0rc1 for fedora using gcc 9 compiles file, but validation
fails in ~150 places.

When building with -O0, everything validates fine.
When building with -O1, everything validates fine.
When building with -O2, validation fails.
When building with -O2 -fsanitize=address,  everything validates fine.

Running clang under valgrind gives good hint on the error location:

valgrind /builddir/build/BUILD/cfe-8.0.0rc1.src/_build/bin/clang -cc1
-internal-isystem
/builddir/build/BUILD/cfe-8.0.0rc1.src/_build/lib64/clang/8.0.0/include
-nostdsysteminc -fopenmp -x c++ -triple powerpc64le-unknown-unknown
-fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm
/builddir/build/BUILD/cfe-8.0.0rc1.src/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
-o -


==2582== Conditional jump or move depends on uninitialised value(s)
==2582==    at 0x880DC79:
clang::CodeGen::CodeGenModule::ConstructAttributeList(llvm::StringRef,
clang::CodeGen::CGFunctionInfo const&, clang::CodeGen::CGCalleeInfo,
llvm::AttributeList&, unsigned int&, bool) (CGCall.cpp:2060)
==2582==    by 0x8A1E749:
clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(clang::GlobalDecl,
clang::CodeGen::CGFunctionInfo const&, llvm::Function*)
(CodeGenModule.cpp:1171)
==2582==    by 0x8A238AA:
clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl,
llvm::Function*, bool, bool) (CodeGenModule.cpp:1548)
==2582==    by 0x8A5CA16:
clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef,
llvm::Type*, clang::GlobalDecl, bool, bool, bool, llvm::AttributeList,
clang::CodeGen::ForDefinition_t) (CodeGenModule.cpp:2824)
==2582==    by 0x87F7FAC:
clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(clang::CXXMethodDecl
const*, clang::CodeGen::StructorType, clang::CodeGen::CGFunctionInfo const*,
llvm::FunctionType*, bool, clang::CodeGen::ForDefinition_t) (CGCXX.cpp:253)
==2582==    by 0x882255E:
clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(clang::CXXConstructorDecl
const*, clang::CXXCtorType, bool, bool, clang::CodeGen::Address,
clang::CodeGen::CallArgList&, clang::CodeGen::AggValueSlot::Overlap_t,
clang::SourceLocation, bool) (CGClass.cpp:2134)
==2582==    by 0x882343C:
clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(clang::CXXConstructorDecl
const*, clang::CXXCtorType, bool, bool, clang::CodeGen::Address,
clang::CXXConstructExpr const*, clang::CodeGen::AggValueSlot::Overlap_t, bool)
(CGClass.cpp:2052)
==2582==    by 0x88B1B79: clang::CodeGen::CodeGenFunction::EmitCXXConstructEx

(...)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190131/b5874377/attachment.html>


More information about the llvm-bugs mailing list