public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hedayat.fwd at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/103537] Using -fstack-protector-strong "without" optimization cause segmentation fault Date: Fri, 03 Dec 2021 20:15:25 +0000 [thread overview] Message-ID: <bug-103537-4-pxx69Ed24N@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103537-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103537 --- Comment #2 from Hedayat Vatankhah <hedayat.fwd at gmail dot com> --- With these options, the code runs a bit more but still crashes. The output of each option is given below: Output with -fsanitize=undefined: /home/hedayat/Projects/powerfake/powerfake.h:257:40: runtime error: load of misaligned address 0x00000044c556 for type '<unknown> *', which requires 8 byte alignment 0x00000044c556: note: pointer points here 00 e8 ac 5a 00 00 84 c0 74 17 48 8d 55 f4 48 8d 45 f8 48 89 c6 bf 00 5c 4b 00 e8 17 5b 00 00 eb ^ zsh: segmentation fault (core dumped) ./sample/samples Output with -fsanitize=address: AddressSanitizer:DEADLYSIGNAL ================================================================= ==261345==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000412704 bp 0x7ffcdfbd4c10 sp 0x7ffcdfbd4c00 T0) ==261345==The signal is caused by a READ memory access. ==261345==Hint: this fault was caused by a dereference of a high value address (see register values below). Dissassemble the provided pc to learn which register was used. #0 0x412704 in decltype(auto) PowerFake::internal::TagBase<OverloadedPrivateInt>::Call<FakeTest::SampleClass2, int>(FakeTest::SampleClass2&, int) (/home/hedayat/Projects/powerfake/build.o/sample/samples+0x412704) #1 0x404c14 in FakeOverloaded() (/home/hedayat/Projects/powerfake/build.o/sample/samples+0x404c14) #2 0x40364e in main (/home/hedayat/Projects/powerfake/build.o/sample/samples+0x40364e) #3 0x7ff8f02a055f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f) #4 0x7ff8f02a060b in __libc_start_main_alias_1 (/lib64/libc.so.6+0x2d60b) #5 0x403584 in _start (/home/hedayat/Projects/powerfake/build.o/sample/samples+0x403584) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/hedayat/Projects/powerfake/build.o/sample/samples+0x412704) in decltype(auto) PowerFake::internal::TagBase<OverloadedPrivateInt>::Call<FakeTest::SampleClass2, int>(FakeTest::SampleClass2&, int) ==261345==ABORTING
next prev parent reply other threads:[~2021-12-03 20:15 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-03 9:11 [Bug c++/103537] New: " hedayat.fwd at gmail dot com 2021-12-03 9:16 ` [Bug middle-end/103537] " pinskia at gcc dot gnu.org 2021-12-03 20:15 ` hedayat.fwd at gmail dot com [this message] 2021-12-03 20:30 ` pinskia at gcc dot gnu.org 2021-12-04 23:04 ` hedayat.fwd at gmail dot com 2021-12-04 23:17 ` hedayat.fwd at gmail dot com 2021-12-04 23:37 ` hedayat.fwd at gmail dot com 2021-12-05 0:19 ` hedayat.fwd at gmail 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-103537-4-pxx69Ed24N@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: linkBe 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).