public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/112644] [14 Regression] Some of the hwasan testcase fail after the recent merge Date: Wed, 31 Jan 2024 14:50:58 +0000 [thread overview] Message-ID: <bug-112644-4-REorZxs8jp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-112644-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112644 --- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>: https://gcc.gnu.org/g:0debaceb11dee9781f9a8b320cb5893836324878 commit r14-8660-g0debaceb11dee9781f9a8b320cb5893836324878 Author: Tamar Christina <tamar.christina@arm.com> Date: Wed Jan 31 14:50:33 2024 +0000 hwasan: instrument new memory and string functions [PR112644] Recent libhwasan updates[1] intercept various string and memory functions. These functions have checking in them, which means there's no need to inline the checking. This patch marks said functions as intercepted, and adjusts a testcase to handle the difference. It also looks for HWASAN in a check in expand_builtin. This check originally is there to avoid using expand to inline the behaviour of builtins like memset which are intercepted by ASAN and hence which we rely on the function call staying as a function call. With the new reliance on function calls in HWASAN we need to do the same thing for HWASAN too. HWASAN and ASAN don't seem to however instrument the same functions. Looking into libsanitizer/sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc it looks like the common ones are memset, memmove and memcpy. The rest of the routines for asan seem to be defined in compiler-rt/lib/asan/asan_interceptors.h however compiler-rt/lib/hwasan/ does not have such a file but it does have compiler-rt/lib/hwasan/hwasan_platform_interceptors.h which it looks like is forcing off everything but memset, memmove, memcpy, memcmp and bcmp. As such I've taken those as the final list that hwasan currently supports. This also means that on future updates this list should be cross checked. [1] https://discourse.llvm.org/t/hwasan-question-about-the-recent-interceptors-being-added/75351 gcc/ChangeLog: PR sanitizer/112644 * asan.h (asan_intercepted_p): Incercept memset, memmove, memcpy and memcmp. * builtins.cc (expand_builtin): Include HWASAN when checking for builtin inlining. gcc/testsuite/ChangeLog: PR sanitizer/112644 * c-c++-common/hwasan/builtin-special-handling.c: Update testcase. Co-Authored-By: Matthew Malcomson <matthew.malcomson@arm.com>
next prev parent reply other threads:[~2024-01-31 14:50 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-21 1:01 [Bug sanitizer/112644] New: " pinskia at gcc dot gnu.org 2023-11-21 1:01 ` [Bug sanitizer/112644] " pinskia at gcc dot gnu.org 2023-11-21 1:04 ` pinskia at gcc dot gnu.org 2023-11-21 1:10 ` pinskia at gcc dot gnu.org 2023-11-21 10:26 ` jakub at gcc dot gnu.org 2023-11-22 11:19 ` tnfchris at gcc dot gnu.org 2023-11-22 11:20 ` jakub at gcc dot gnu.org 2023-12-01 10:40 ` tnfchris at gcc dot gnu.org 2023-12-01 10:41 ` tnfchris at gcc dot gnu.org 2023-12-05 10:18 ` tnfchris at gcc dot gnu.org 2024-01-29 17:26 ` tnfchris at gcc dot gnu.org 2024-01-31 14:49 ` cvs-commit at gcc dot gnu.org 2024-01-31 14:50 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-31 14:52 ` cvs-commit at gcc dot gnu.org 2024-01-31 14:54 ` tnfchris at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-112644-4-REorZxs8jp@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).