From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B63BD3857808; Fri, 2 Jul 2021 16:18:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B63BD3857808 From: "florin.iucha at amd dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/100439] stack overflow running ubsan Date: Fri, 02 Jul 2021 16:18:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 11.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: florin.iucha at amd dot com X-Bugzilla-Status: WAITING 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: Message-ID: In-Reply-To: References: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 16:18:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100439 --- Comment #10 from Florin Iucha --- I am able to reproduce something similar by building GCC11 from snapshot 11-20210626 (96358cbbdddde6e6447519a155301b6acb1624c0) and then using Clang= 12 (12.0.1-rc4) ubsan: #234 0x7f9769d39670 in __cxxabiv1::__si_class_type_info::__do_dyncast(l= ong, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__[0/48169] e_info const*, void const*, __cxxabiv1::__class_type_info const*, void cons= t*, __cxxabiv1::__class_type_info::__dyncast_result&) const /home/fiuch a/tools/gcc.objdir/x86_64-linux-gnu/libstdc++-v3/libsupc++/../../../../gcc/= libstdc++-v3/libsupc++/si_class_type_info.cc:52:13 #235 0x7f9769d379e8 in __dynamic_cast /home/fiucha/tools/gcc.objdir/x86_64-linux-gnu/libstdc++-v3/libsupc++/../..= /../../gcc/libstdc++-v3/libsu pc++/dyncast.cc:74:28 #236 0x5dd0b6 in __ubsan::checkDynamicType(void*, void*, unsigned long) /home/fiucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_type_hash_itaniu m.cpp:233:5 #237 0x5dbf11 in HandleDynamicTypeCacheMiss(__ubsan::DynamicTypeCacheMissData*, unsigned lon= g, unsigned long, __ubsan::ReportOptions) /home/fiucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp:36:7= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 #238 0x5dbee9 in __ubsan_handle_dynamic_type_cache_miss /home/fiucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp:87:3 #239 0x60b931 in std::type_info::operator=3D=3D(std::type_info const&) = const /opt/gcc11-for-tng/lib/gcc/x86_64-linux-gnu/11.1.1/../../../../include/c++/= 11.1.1/typeinfo:122:16 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 #240 0x7f9769d39670 in __cxxabiv1::__si_class_type_info::__do_dyncast(long, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const /home/fiucha/tools/gcc.objdir/x86_64-linux-gnu/libstdc++-v3/libsupc++/../..= /../../gcc/libstdc++-v3/libsupc++/si_class_type_info.cc:52:13 #241 0x7f9769d379e8 in __dynamic_cast /home/fiucha/tools/gcc.objdir/x86_64-linux-gnu/libstdc++-v3/libsupc++/../..= /../../gcc/libstdc++-v3/libsu pc++/dyncast.cc:74:28 #242 0x5dd0b6 in __ubsan::checkDynamicType(void*, void*, unsigned long) /home/fiucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_type_hash_itaniu m.cpp:233:5 #243 0x5dbf11 in HandleDynamicTypeCacheMiss(__ubsan::DynamicTypeCacheMissData*, unsigned lon= g, unsigned long, __ubsan::ReportOptions) /home/fi ucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp:36:7 #244 0x5dbee9 in __ubsan_handle_dynamic_type_cache_miss /home/fiucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp:87:3 #245 0x60b931 in std::type_info::operator=3D=3D(std::type_info const&) = const /opt/gcc11-for-tng/lib/gcc/x86_64-linux-gnu/11.1.1/../../../../includ e/c++/11.1.1/typeinfo:122:16 #246 0x7f9769d39670 in __cxxabiv1::__si_class_type_info::__do_dyncast(l= ong, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_typ e_info const*, void const*, __cxxabiv1::__class_type_info const*, void cons= t*, __cxxabiv1::__class_type_info::__dyncast_result&) const /home/fiuch a/tools/gcc.objdir/x86_64-linux-gnu/libstdc++-v3/libsupc++/../../../../gcc/= libstdc++-v3/libsupc++/si_class_type_info.cc:52:13 #247 0x7f9769d379e8 in __dynamic_cast /home/fiucha/tools/gcc.objdir/x86_64-linux-gnu/libstdc++-v3/libsupc++/../..= /../../gcc/libstdc++-v3/libsu pc++/dyncast.cc:74:28 #248 0x5dd0b6 in __ubsan::checkDynamicType(void*, void*, unsigned long) /home/fiucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_type_hash_itaniu m.cpp:233:5 #249 0x5dbf11 in HandleDynamicTypeCacheMiss(__ubsan::DynamicTypeCacheMissData*, unsigned lon= g, unsigned long, __ubsan::ReportOptions) /home/fi ucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp:36:7 SUMMARY: AddressSanitizer: stack-overflow /home/fiucha/tools/llvm12/compiler-rt/lib/sanitizer_common/sanitizer_posix_= libcdep.cpp:278 in __sanitize r::IsAccessibleMemoryRange(unsigned long, unsigned long) =3D=3D2162813=3D=3DABORTING This doesn't fail on a simple hello_ub.cpp example - but on a complex module using Google test, again.=