From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 0B1733858C50 for ; Thu, 9 Feb 2023 10:59:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B1733858C50 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1675940391; bh=iXa9jCDrycSmOEW0C7IE5D36xNqUzbVarlXxVEk1LxM=; h=Subject:From:To:Date:In-Reply-To:References:From; b=d5XKj6d7l+csMdh/d2HpRwV1TPuBwJwYOxUdlmOEI37p2UmISu5ss1EdV+gfriqu2 TAK8eJQ0uU5v5uyjjAXGky/jd2/oIzdaJ9fxNq0GyzFmxsLSdCFTWGlQj64ZCH+UhM iyBRdaCl7s/K50Y2FCEobRfU3624ZMj+kCMrpvAE= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 2C1D965B86; Thu, 9 Feb 2023 05:59:49 -0500 (EST) Message-ID: Subject: Re: Random Crash Observed while running program compiled with latest gcc From: Xi Ruoyao To: praveen ab , gcc-help@gcc.gnu.org Date: Thu, 09 Feb 2023 18:59:47 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 2023-02-09 at 16:26 +0530, praveen ab via Gcc-help wrote: > Hi All, >=20 > 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? >=20 > 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. >=20 > Please Suggest anything else that needs to be checked? Try -fsanitize=3Dundefined and -fsanitize=3Daddress. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University