Skip to content

Commit d77cc2c

Browse files
committed
[ASan] Add __attribute__((used)) to __asan_malloc_impl and
__asan_free_impl. To avoid optimization of these definitions by adding them to compiler used global list. Change-Id: If35972d52e5f372e0d2b1ca5bde154b440accb8d
1 parent 1d98af4 commit d77cc2c

File tree

1 file changed

+2
-0
lines changed
  • amd/device-libs/asanrtl/src

1 file changed

+2
-0
lines changed

amd/device-libs/asanrtl/src/dm.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ non_slab_free(__global alloc_t *ap, ulong pc)
324324
}
325325

326326
// free
327+
USED
327328
NO_INLINE
328329
NO_SANITIZE_ADDR
329330
void
@@ -606,6 +607,7 @@ slab_malloc(ulong lsz, ulong pc)
606607
}
607608

608609
// malloc
610+
USED
609611
NO_INLINE
610612
NO_SANITIZE_ADDR
611613
ulong

0 commit comments

Comments
 (0)