From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A7BA3858D33; Wed, 12 Apr 2023 18:07:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A7BA3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681322875; bh=TcuwamYrECaM4hzwQE6kvrpRJ+6BmHHoRh/K/m3zLEk=; h=From:To:Subject:Date:From; b=Ij3uSDR9w/oQNYsWxAq3Fuh62V+Bb1NadcuAkqV8CAg6rczeQtAkDp/xerRc1Zgko 1h979ICF1N8H37flN2uxvwTveAQGxQM9CzB1MK63wxL/rq8+w4P2ar1bgICgGCJD3y +s9uFbuE6uN7+8Ue/4xgq4A4eODqcaJpg4N2O5Kw= From: "i at maskray dot me" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109489] New: [ubsan] Support -fsanitize-trap= Date: Wed, 12 Apr 2023 18:07:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: i at maskray dot me 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 target_milestone 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=3D109489 Bug ID: 109489 Summary: [ubsan] Support -fsanitize-trap=3D Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Clang has supported -fsanitize-trap=3Dundefined and many fine-grained optio= ns[1] e.g. -fsanitize-trap=3Dalignment since 2015. -fsanitize-undefined-trap-on-error is a deprecated alias for -fsanitize-trap=3Dundefined in Clang. -fsanitize-trap=3D provides fine-grai= ned control over putting specific checks into the trap mode, and it provides a unified interface with -fsanitize=3D and -fsanitize-recover=3D. As an example, -fsanitize=3Dundefined in the normal mode may increase the b= inary size a lot. The user may put some checks into the trap mode while keeping the rest in t= he normal mode (-fsanitize-trap=3Dalignment,null) to make the binary smaller. [1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html=