public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] ASAN: call initialize_sanitizer_builtins for hwasan [PR115205]
@ 2024-05-29  3:27 Andrew Pinski
  0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2024-05-29  3:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Pinski

Sometimes initialize_sanitizer_builtins is not called before emitting
the asan builtins with hwasan. In the case of the bug report, there
was a path with the fortran front-end where it was not called.
So let's call it in asan_instrument before calling transform_statements.

Built and tested for aarch64-linux-gnu with no regressions.

gcc/ChangeLog:

	PR sanitizer/115205
	* asan.cc (asan_instrument): Call initialize_sanitizer_builtins
	for hwasan.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
 gcc/asan.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/asan.cc b/gcc/asan.cc
index 9e0f51b1477..c684ca6d366 100644
--- a/gcc/asan.cc
+++ b/gcc/asan.cc
@@ -4276,6 +4276,7 @@ asan_instrument (void)
 {
   if (hwasan_sanitize_p ())
     {
+      initialize_sanitizer_builtins ();
       transform_statements ();
       return 0;
     }
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-29  3:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-29  3:27 [PATCH] ASAN: call initialize_sanitizer_builtins for hwasan [PR115205] Andrew Pinski

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).