From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96B62385E021; Tue, 24 Mar 2020 18:17:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96B62385E021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585073872; bh=0LHRNDE3nqm1oC7A+zKM2KPJiPCFJy6hqG4l+/3aXVc=; h=From:To:Subject:Date:From; b=rppVwnwoqVYQDLY0Ci6S98FJePsSwpD9vS22TZNK5nRwPt5F7huyqfwjtMTSeYqUP 1PM1BCfZ3WdcbCmY6GTuP8yfjg3b5b+XrLer1ogm3xm1qupT03W1vZO31gVwA9tSzO AnSkDXXH+48zsHlhWHb8srMedj6gvk4lS4iNQz8M= From: "kees at outflux dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/94307] New: Provide a way to declare the *SAN exception handler -fsanitize-undefined-trap-on-error Date: Tue, 24 Mar 2020 18:17:52 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kees at outflux dot net 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 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 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: Tue, 24 Mar 2020 18:17:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94307 Bug ID: 94307 Summary: Provide a way to declare the *SAN exception handler -fsanitize-undefined-trap-on-error Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: kees at outflux dot net 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, marxi= n at gcc dot gnu.org Target Milestone: --- Instead of unconditionally calling __builtin_trap() for -fsanitize-undefined-trap-on-error it would help the Linux kernel's use of UBSAN to have a way to specify the trap function. With that, Linux can use = its own internal exception handling routines and avoid various confused states: https://lore.kernel.org/linux-next/20200324164433.qusyu5h7ykx3f2bu@treble/ For example something like -fsanitize-undefined-trap-function=3D__ubsan_tra= p and "__ubsan_trap" can then be defined by the kernel itself. Using the standard handler routines (__ubsan_handle_*) are too heavy duty for some builds, so a regular trap is needed for the kernel, but this allows us to provide a "continue anyway" option as well.=