PR sanitizer/89124
* ipa-inline.c (sanitize_attrs_match_for_inline_p): Allow inlining
always_inline callees into no_sanitize_address callers.
* c-c++-common/asan/pr89124.c: New test.
From-SVN: r268415
+2019-01-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/89124
+ * ipa-inline.c (sanitize_attrs_match_for_inline_p): Allow inlining
+ always_inline callees into no_sanitize_address callers.
+
2019-01-31 Richard Biener <rguenther@suse.de>
PR rtl-optimization/89115
if (!caller || !callee)
return true;
+ /* Allow inlining always_inline functions into no_sanitize_address
+ functions. */
+ if (!sanitize_flags_p (SANITIZE_ADDRESS, caller)
+ && lookup_attribute ("always_inline", DECL_ATTRIBUTES (callee)))
+ return true;
+
return ((sanitize_flags_p (SANITIZE_ADDRESS, caller)
== sanitize_flags_p (SANITIZE_ADDRESS, callee))
&& (sanitize_flags_p (SANITIZE_POINTER_COMPARE, caller)
+2019-01-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/89124
+ * c-c++-common/asan/pr89124.c: New test.
+
2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/52564
--- /dev/null
+/* PR sanitizer/89124 */
+/* { dg-do compile } */
+
+static int inline __attribute__ ((always_inline))
+foo (int x)
+{
+ return x + 1;
+}
+
+__attribute__ ((no_sanitize_address)) int
+bar (int x)
+{
+ return foo (x);
+}