public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "florin.iucha at amd dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/100439] stack overflow running ubsan
Date: Fri, 02 Jul 2021 16:18:47 +0000	[thread overview]
Message-ID: <bug-100439-4-tTi0suNuOz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100439-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100439

--- Comment #10 from Florin Iucha <florin.iucha at amd dot com> ---
I am able to reproduce something similar by building GCC11 from snapshot
11-20210626 (96358cbbdddde6e6447519a155301b6acb1624c0) and then using Clang12
(12.0.1-rc4) ubsan:

    #234 0x7f9769d39670 in __cxxabiv1::__si_class_type_info::__do_dyncast(long,
__cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__[0/48169]
e_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*,
__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 long,
unsigned long, __ubsan::ReportOptions)
/home/fiucha/tools/llvm12/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cpp:36:7    
                                                                             
#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==(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
                                                                               
                                         #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 long,
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==(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(long,
__cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_typ
e_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*,
__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 long,
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)
==2162813==ABORTING


This doesn't fail on a simple hello_ub.cpp example - but on a complex module
using Google test, again.

  parent reply	other threads:[~2021-07-02 16:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 19:17 [Bug sanitizer/100439] New: " florin.iucha at amd dot com
2021-05-06  6:32 ` [Bug sanitizer/100439] " rguenth at gcc dot gnu.org
2021-05-06 11:59 ` florin.iucha at amd dot com
2021-05-06 14:30 ` florin.iucha at amd dot com
2021-05-12 10:10 ` marxin at gcc dot gnu.org
2021-05-13 12:34 ` florin.iucha at amd dot com
2021-05-13 15:29 ` florin.iucha at amd dot com
2021-05-13 15:31 ` florin.iucha at amd dot com
2021-05-14 10:55 ` marxin at gcc dot gnu.org
2021-05-14 10:59 ` florin.iucha at amd dot com
2021-07-02 16:18 ` florin.iucha at amd dot com [this message]
2021-07-02 16:26 ` florin.iucha at amd dot com
2021-07-02 16:35 ` florin.iucha at amd dot com
2021-07-06 13:29 ` florin.iucha at amd dot com
2021-07-06 17:34 ` florin.iucha at amd dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100439-4-tTi0suNuOz@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).