Message ID | 20240529032722.2119732-1-quic_apinski@quicinc.com |
---|---|
State | New |
Headers | show |
Series | ASAN: call initialize_sanitizer_builtins for hwasan [PR115205] | expand |
On Tue, May 28, 2024 at 8:28 PM Andrew Pinski <quic_apinski@quicinc.com> wrote: > > 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. Ping? Another duplicate of the bug report came in too. > > 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 >
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; }
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(+)