From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9314F386076C; Wed, 3 Jul 2024 07:48:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9314F386076C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719992936; bh=uqgnsBLNxF1gyIl7xe+xnvKPANRuUF9ZGFcaxJFnxkM=; h=From:To:Subject:Date:From; b=qDprJG7EsEFQqS5WIeo4niCK6GpfQ2QpSRSEUgX0Y4olODhzGFL1pYhIV1lSy+hnm DrGd67hvnLzFIemY0LLYBxMECP5kpumMo5etipH24SLgmhrkqAX3GDizqeG0jJlwhT ErPoTmvnE9LaZs1VlXsI1r1tSal3xZD2X54sSjmE= From: "bic60176 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/115765] New: [13 Regression] signed integer overflow check missing Date: Wed, 03 Jul 2024 07:48:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bic60176 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115765 Bug ID: 115765 Summary: [13 Regression] signed integer overflow check missing Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: bic60176 at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- Created attachment 58577 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D58577&action=3Dedit testcase OS: Ubuntu 22.04.3 LTS We found a case that UBSAN failed to report signed integer overflow behavior when compiling with gcc-13.2.0, gcc-12.3.0, gcc-11.4.0 at optimization leve= ls -O0. $ ../compiler-builds/gcc-13.2.0_build/bin/gcc -fsanitize=3Dundefined -fsanitize=3Daddress -g -lgcc_s -I/home/csmith/include/csmith-2.3.0 -O0 testcase.c -o exec $ timeout 1s ./exec 2>exec.err $ cat exec.err $ ../compiler-builds/gcc-14.1.0_build/bin/gcc -fsanitize=3Dundefined -fsanitize=3Daddress -g -lgcc_s -I/home/csmith/include/csmith-2.3.0 -O1 testcase.c -o exec $ timeout 1s ./exec 2>exec.err $ cat exec.err testcase.c:6:24: runtime error: signed integer overflow: 65533 * 67286 cann= ot be represented in type 'int'=