From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D7729383237E; Thu, 15 Dec 2022 09:47:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7729383237E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671097651; bh=M81VzFktqv6YCnyzgOEzGGOFKW/brhtviECySzg2raE=; h=From:To:Subject:Date:From; b=LnhC0E7xLcQDhGvISq0HyWhoRapH7GPdX2678Q2/NnDOEf1vzPi1H1/6A1s6xoPDK siVAmPpABW+kcz39t9tnT1wl4G54ODeOLBZuA44m4IOj4as3veHP1Ga5fFcpPa12KI VwvX8tylQeyAeJgHrOx1ynhN4zdZwYoReR74Nvbc= From: "marxin at gcc dot gnu.org" To: gcc-rust@gcc.gnu.org Subject: [Bug rust/108124] New: UBSAN issues when tests are run Date: Thu, 15 Dec 2022 09:47:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rust X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108124 Bug ID: 108124 Summary: UBSAN issues when tests are run Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rust Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: dkm at gcc dot gnu.org, gcc-rust at gcc dot gnu.org Target Milestone: --- I built GCC compiler with ASAN & UBSAN enabled: F=3D"-fsanitize=3Daddress,undefined -g -O2" ; make -j32 all-host -k CFLAGS= =3D"$F" CXXFLAGS=3D"$F" LDFLAGS=3D"$F" and I see a couple of issues: ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/rust/compile/torture/must_use2.r= s -c /usr/include/c++/12/bits/stl_iterator.h:1096:17: runtime error: reference binding to null pointer of type 'struct SubstitutionParamMapping' #0 0x3be00ae in __gnu_cxx::__normal_iterator > >::operator*() const /usr/include/c++/12/bits/stl_iterator.h:1096 #1 0x3be00ae in std::vector >::front() /usr/include/c++/12/bits/stl_vector.h:1207 #2 0x3be00ae in Rust::TyTy::TypeBoundPredicate::TypeBoundPredicate(Rust::DefId, std::vector >, Location) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-tyty-bounds.cc:129 #3 0x3be0ea3 in Rust::TyTy::TypeBoundPredicate::error() /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-tyty-bounds.cc:207 #4 0x3cc9cb8 in Rust::Resolver::TypeCheckItem::visit(Rust::HIR::ImplBlo= ck&) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-hir-type-check-item.cc= :74 #5 0x3cc72e7 in Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-hir-type-check-item.cc= :39 #6 0x39c3724 in Rust::Resolver::TypeResolution::Resolve(Rust::HIR::Crat= e&) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-hir-type-check.cc:48 #7 0x2aff5ff in Rust::Session::compile_crate(char const*) /home/marxin/Programming/gcc/gcc/rust/rust-session-manager.cc:565 #8 0x2b0420e in Rust::Session::handle_input_files(int, char const**) /home/marxin/Programming/gcc/gcc/rust/rust-session-manager.cc:362 #9 0x212ce46 in grs_langhook_parse_file /home/marxin/Programming/gcc/gcc/rust/rust-lang.cc:184 #10 0xcf3b22e in compile_file /home/marxin/Programming/gcc/gcc/toplev.cc:444 #11 0xcf4f14d in do_compile /home/marxin/Programming/gcc/gcc/toplev.cc:= 2125 #12 0xcf4f14d in toplev::main(int, char**) /home/marxin/Programming/gcc/gcc/toplev.cc:2277 #13 0x10409e86 in main /home/marxin/Programming/gcc/gcc/main.cc:39 #14 0x7ffff6a2c5af in __libc_start_call_main (/lib64/libc.so.6+0x275af) #15 0x7ffff6a2c678 in __libc_start_main_impl (/lib64/libc.so.6+0x27678) #16 0x212cbd4 in _start ../sysdeps/x86_64/start.S:115 /usr/include/c++/12/bits/stl_vector.h:1207:16: runtime error: reference bin= ding to null pointer of type 'struct value_type' #0 0x3be00e8 in std::vector >::front() /usr/include/c++/12/bits/stl_vector.h:1207 #1 0x3be00e8 in Rust::TyTy::TypeBoundPredicate::TypeBoundPredicate(Rust::DefId, std::vector >, Location) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-tyty-bounds.cc:129 #2 0x3be0ea3 in Rust::TyTy::TypeBoundPredicate::error() /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-tyty-bounds.cc:207 #3 0x3cc9cb8 in Rust::Resolver::TypeCheckItem::visit(Rust::HIR::ImplBlo= ck&) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-hir-type-check-item.cc= :74 #4 0x3cc72e7 in Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-hir-type-check-item.cc= :39 #5 0x39c3724 in Rust::Resolver::TypeResolution::Resolve(Rust::HIR::Crat= e&) /home/marxin/Programming/gcc/gcc/rust/typecheck/rust-hir-type-check.cc:48 #6 0x2aff5ff in Rust::Session::compile_crate(char const*) /home/marxin/Programming/gcc/gcc/rust/rust-session-manager.cc:565 #7 0x2b0420e in Rust::Session::handle_input_files(int, char const**) /home/marxin/Programming/gcc/gcc/rust/rust-session-manager.cc:362 #8 0x212ce46 in grs_langhook_parse_file /home/marxin/Programming/gcc/gcc/rust/rust-lang.cc:184 #9 0xcf3b22e in compile_file /home/marxin/Programming/gcc/gcc/toplev.cc= :444 #10 0xcf4f14d in do_compile /home/marxin/Programming/gcc/gcc/toplev.cc:= 2125 #11 0xcf4f14d in toplev::main(int, char**) /home/marxin/Programming/gcc/gcc/toplev.cc:2277 #12 0x10409e86 in main /home/marxin/Programming/gcc/gcc/main.cc:39 #13 0x7ffff6a2c5af in __libc_start_call_main (/lib64/libc.so.6+0x275af) #14 0x7ffff6a2c678 in __libc_start_main_impl (/lib64/libc.so.6+0x27678) #15 0x212cbd4 in _start ../sysdeps/x86_64/start.S:115 /home/marxin/Programming/gcc/gcc/rust/util/fnv-hash.h:73:15: runtime error: shift exponent 6685089673273576526 is too large for 64-bit type 'long unsig= ned int' #0 0x2b84979 in Rust::Hash::FNV128::write(unsigned char const*, unsigned long) /home/marxin/Programming/gcc/gcc/rust/util/fnv-hash.h:73 #1 0x2b84979 in legacy_hash /home/marxin/Programming/gcc/gcc/rust/backend/rust-mangle.cc:105 #2 0x2b84979 in legacy_mangle_item /home/marxin/Programming/gcc/gcc/rust/backend/rust-mangle.cc:266 #3 0x2b812ec in Rust::Compile::Mangler::mangle_item[abi:cxx11](Rust::TyTy::BaseType const*, Rust::Resolver::CanonicalPath const&) const /home/marxin/Programming/gcc/gcc/rust/backend/rust-mangle.cc:298 #4 0x421452f in Rust::Compile::Context::mangle_item[abi:cxx11](Rust::TyTy::BaseType const*, Rust::Resolver::CanonicalPath const&) const /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile-context.h:297 #5 0x421452f in Rust::Compile::HIRCompileBase::compile_function(Rust::Compile::Context*, std::__cxx11::basic_string, std::allocator > const&, Rust::HIR::SelfParam&, std::vector >&, Rust::HIR::FunctionQualifiers const&, Rust::HIR::Visibility&, std::vector >&, Location, Rust::HIR::BlockExpr*, Rust::Resolver::CanonicalPath const*, Rust::TyTy::FnType*, bool) /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile-base.cc:537 #6 0x40b4f0e in Rust::Compile::CompileItem::visit(Rust::HIR::Function&) /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile-item.cc:164 #7 0x40a0319 in Rust::Compile::CompileInherentImplItem::Compile(Rust::HIR::ImplItem*, Rust::Compile::Context*, Rust::TyTy::BaseType*, bool, Location) /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile-implitem.h:39 #8 0x40a0319 in Rust::Compile::CompileItem::visit(Rust::HIR::ImplBlock&) /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile-item.cc:186 #9 0x2b64718 in Rust::Compile::CompileItem::compile(Rust::HIR::Item*, Rust::Compile::Context*, Rust::TyTy::BaseType*, bool, Location) /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile-item.h:37 #10 0x2b64718 in Rust::Compile::CompileCrate::go() /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile.cc:51 #11 0x2b64eb1 in Rust::Compile::CompileCrate::Compile(Rust::HIR::Crate&, Rust::Compile::Context*) /home/marxin/Programming/gcc/gcc/rust/backend/rust-compile.cc:44 #12 0x2aff8d5 in Rust::Session::compile_crate(char const*) /home/marxin/Programming/gcc/gcc/rust/rust-session-manager.cc:587 #13 0x2b0420e in Rust::Session::handle_input_files(int, char const**) /home/marxin/Programming/gcc/gcc/rust/rust-session-manager.cc:362 #14 0x212ce46 in grs_langhook_parse_file /home/marxin/Programming/gcc/gcc/rust/rust-lang.cc:184 #15 0xcf3b22e in compile_file /home/marxin/Programming/gcc/gcc/toplev.cc:444 #16 0xcf4f14d in do_compile /home/marxin/Programming/gcc/gcc/toplev.cc:= 2125 #17 0xcf4f14d in toplev::main(int, char**) /home/marxin/Programming/gcc/gcc/toplev.cc:2277 #18 0x10409e86 in main /home/marxin/Programming/gcc/gcc/main.cc:39 #19 0x7ffff6a2c5af in __libc_start_call_main (/lib64/libc.so.6+0x275af) #20 0x7ffff6a2c678 in __libc_start_main_impl (/lib64/libc.so.6+0x27678) #21 0x212cbd4 in _start ../sysdeps/x86_64/start.S:115 --=20 You are receiving this mail because: You are on the CC list for the bug.=