From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2FAE138515E4; Wed, 4 Aug 2021 08:31:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FAE138515E4 From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/99694] [9 Regression] gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os since r9-7156-g33579b59aaf02eb7 Date: Wed, 04 Aug 2021 08:31:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: haoxintu at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2021 08:31:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99694 --- Comment #11 from Haoxin Tu --- Hi all. I hope you all are doing well. I am sorry to bother you again. May I ask a quick question about how do you treat the bug-revealing test case which may include the valid syntax but contain the UB? (e.g.,"b =3D i / 0;" in the above case is undefined). BTW, = I did not find my answer in the document https://www.gnu.org/software/gcc/bugs/management.html. (1)From my understanding, compilers should compile well (no crashing or performance issue) with those test programs although they contain UB. Ideal= ly, programmers may introduce a UB by accident in their program, after compilin= g, not to mention whether the warning message emitted by compilers is correct = or not, compilers should exit normally. Am I correct here?=20 (2)From my experience, those bugs caused by the UB-included program can alw= ays occur in the optimization phase. So I think those test cases can be critica= l as well (compared with wrong-code issues)? How do you categorize the importanc= e of related crashes or performance issues caused by such test programs?=20 I am asking the question because I am thinking whether the effort is worthi= ng or not if I devise a tool that can produce diverse syntactic valid but may contain UB test programs to detect crashes or performance issues in compile= rs. The motivation is that I noticed the goal of most existing program generato= rs (e.g.,Csmith [1], YARPGen [2]) is to produce UB-free test programs to detect miscompiliation bugs in compilers, few (only CCG [3], a quite old tool so t= hat may be hard to find bugs right now) aims to detect crashs using programs wi= th UB. So I guess our community may lack such test cases to further stress compilers. If such diverse test programs (such as the reported one) can help improve the quality of compilers, I'd like to spend some time on it. Sorry again for my bothering and any suggestions are welcome!=20 [1] https://github.com/csmith-project/csmith [2] https://github.com/intel/yarpgen [3] https://github.com/Mrktn/ccg Thanks! Haoxin=