Random Crash Observed while running program compiled with latest gcc
praveen ab
praveenasb@gmail.com
Thu Feb 9 17:45:51 GMT 2023
Hi Xi Ruoyao and Arsen Arsenović
Thanks for the suggestion to use -fsanitize=undefined flag, with this flag
I am able to identify and fix multiple runtime errors and further able to
find many more as I am proceeding with running different scenarios.
@Arsen Arsenović: I am using GCC 11.3 (I started observing the random crash
issue due to UBs with gcc > 7.4)
On Thu, Feb 9, 2023 at 4:37 PM Arsen Arsenović <arsen@aarsen.me> wrote:
> 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ć
>
--
*Thanks and Regards,*
*Praveen AB*
More information about the Gcc-help
mailing list