Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM 14 support or higher LLVM version support #6

Open
charlesxsh opened this issue Sep 15, 2022 · 1 comment
Open

LLVM 14 support or higher LLVM version support #6

charlesxsh opened this issue Sep 15, 2022 · 1 comment

Comments

@charlesxsh
Copy link

Hi there,

Thanks for presenting this excellent work. I noticed that it currently worked at LLVM 7. Is it possible to migrate to LLVM 14 or other newer LLVM version?

@charlesxsh
Copy link
Author

I am trying to migrate this tool to LLVM 14. The compilation of new LLVM after applying the patch was successful. However, after running the program using the patched LLVM with ASAN, the runtime of the program get following issues:

==1583121==ERROR: AddressSanitizer: SEGV on unknown address 0x1000cbb83574 (pc 0x55e4181dcd63 bp 0x7ffdddc1ab80 sp 0x7ffdddc1a330 T-1)

gdb output:

__memset_avx2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:409
409     ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: No such file or directory.
(gdb) where
#0  __memset_avx2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:409
#1  0x00005555555e3a7d in __asan::FastPoisonShadow (value=249 '\371', aligned_size=<optimized out>, aligned_beg=<optimized out>)
    at .../rust/src/llvm-project/compiler-rt/lib/asan/asan_poisoning.h:55
#2  __asan::PoisonRedZones (g=...) at .../rust/src/llvm-project/compiler-rt/lib/asan/asan_globals.cpp:66
#3  __asan::RegisterGlobal (g=0x55555589da40) at .../rust/src/llvm-project/compiler-rt/lib/asan/asan_globals.cpp:223
#4  __asan_register_globals (globals=0x55555589da40, n=5084) at .../rust/src/llvm-project/compiler-rt/lib/asan/asan_globals.cpp:390
#5  0x00005555555e500e in __asan_register_elf_globals (flag=0x555555e211e0 <___asan_globals_registered>, start=<optimized out>, stop=<optimized out>)
    at .../rust/src/llvm-project/compiler-rt/lib/asan/asan_globals.cpp:343
#6  0x00005555556b5fb5 in asan.module_ctor ()
#7  0x0000555555882a50 in __frame_dummy_init_array_entry ()
#8  0x00007ffff7ca3ebb in call_init (env=<optimized out>, argv=0x7fffffffde78, argc=1) at ../csu/libc-start.c:145
#9  __libc_start_main_impl (main=0x5555556b5e70 <main>, argc=1, argv=0x7fffffffde78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffffffde68) at ../csu/libc-start.c:379
#10 0x00005555555d2645 in _start ()

It looks like during ASAN init, poisoning the global, FastPoisonShadow causes the SEGV write (report by ASAN itself) on 0x1000cbb83574. Does anyone know where is possibly wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant