From: "Arsen Arsenović" <arsen@aarsen.me>
To: praveen ab <praveenasb@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Random Crash Observed while running program compiled with latest gcc
Date: Thu, 09 Feb 2023 12:01:17 +0100 [thread overview]
Message-ID: <86edqzxfku.fsf@aarsen.me> (raw)
In-Reply-To: <CAFtRY14PEx9R0pB8VxtoLTKUJRqNMFKM5naqxhM57Lp27z+zXw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]
Hi,
praveen ab via Gcc-help <gcc-help@gcc.gnu.org> writes:
> Hi All,
>
> We are upgrading the GCC version for our existing C/C++ project.
> Earlier we were using gcc 5.4 and everything was working fine.(The
> application works fine even with gcc 7.4)
> When trying to build the application using gcc 8.1 and above we are
> observing the random crashes mostly segmentation fault.
> Any suggestions on how to debug this?
>
> Right now I am trying the following:
> Enabling the -Wall flag and trying to fix all the warnings
> Using GDB to inspect memory location and variables.
>
> Please Suggest anything else that needs to be checked?
The UB sanitizer might also prove useful to detect UB that does not
necessarily result in crashes. Pass -fsanitize=undefined to enable it.
I can't provide much more specific instructions, but it's quite likely
that there's a good bit of UB in the code you're building, if it broke
in such a regard on compiler updates.
Is there a reason for using GCC 8 as opposed to newer GCC versions?
Best of luck, have a great day.
--
Arsen Arsenović
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]
next prev parent reply other threads:[~2023-02-09 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 10:56 praveen ab
2023-02-09 10:59 ` Xi Ruoyao
2023-02-09 11:01 ` Arsen Arsenović [this message]
2023-02-09 17:45 ` praveen ab
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=86edqzxfku.fsf@aarsen.me \
--to=arsen@aarsen.me \
--cc=gcc-help@gcc.gnu.org \
--cc=praveenasb@gmail.com \
/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).