[PATCH] D88936: [HWAsan][NewPM] Handle hwasan like other sanitizers

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 8 11:24:25 PDT 2020


aeubanks added a comment.

diff for hwasan + -O1:

14a15

> @__hwasan_shadow = external global [0 x i8]

72a74,109

> declare void @__hwasan_loadN(i64, i64)
>
> declare void @__hwasan_load1(i64)
>
> declare void @__hwasan_load2(i64)
>
> declare void @__hwasan_load4(i64)
>
> declare void @__hwasan_load8(i64)
>
> declare void @__hwasan_load16(i64)
>
> declare void @__hwasan_storeN(i64, i64)
>
> declare void @__hwasan_store1(i64)
>
> declare void @__hwasan_store2(i64)
>
> declare void @__hwasan_store4(i64)
>
> declare void @__hwasan_store8(i64)
>
> declare void @__hwasan_store16(i64)
>
> declare void @__hwasan_tag_memory(i8*, i8, i64)
>
> declare i8 @__hwasan_generate_tag()
>
> declare i8* @__hwasan_memmove(i8*, i8*, i64)
>
> declare i8* @__hwasan_memcpy(i8*, i8*, i64)
>
> declare i8* @__hwasan_memset(i8*, i32, i64)
>
> declare void @__hwasan_handle_vfork(i64)

diff for khwasan + -O1:

7a8

> @__hwasan_shadow = external global [0 x i8]

34,35c35,36
<   call void asm sideeffect "int3\0Anopl 66(%rax)", "{rdi}"(i64 %4)

<   unreachable
---------------

>   call void asm sideeffect "int3\0Anopl 98(%rax)", "{rdi}"(i64 %4)
>   br label %27

51c52

< 27:                                               ; preds = %22
-----------------------------------------------------------------

> 27:                                               ; preds = %16, %22

60a62,97

> declare void @__hwasan_loadN_noabort(i64, i64)
>
> declare void @__hwasan_load1_noabort(i64)
>
> declare void @__hwasan_load2_noabort(i64)
>
> declare void @__hwasan_load4_noabort(i64)
>
> declare void @__hwasan_load8_noabort(i64)
>
> declare void @__hwasan_load16_noabort(i64)
>
> declare void @__hwasan_storeN_noabort(i64, i64)
>
> declare void @__hwasan_store1_noabort(i64)
>
> declare void @__hwasan_store2_noabort(i64)
>
> declare void @__hwasan_store4_noabort(i64)
>
> declare void @__hwasan_store8_noabort(i64)
>
> declare void @__hwasan_store16_noabort(i64)
>
> declare void @__hwasan_tag_memory(i8*, i8, i64)
>
> declare i8 @__hwasan_generate_tag()
>
> declare i8* @memmove(i8*, i8*, i64)
>
> declare i8* @memcpy(i8*, i8*, i64)
>
> declare i8* @memset(i8*, i32, i64)

Looks like the IR is the (mostly) same, just some declarations cleaned up.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88936/new/

https://reviews.llvm.org/D88936



More information about the cfe-commits mailing list