[sanitizer] Intercept glibc's argp_parse()
Glibc provides the argp_parse() function for parsing command line arguments [1]. Indicate that argc/argv are read from and arg_index is written to. Strictly speaking, we also need to indicate that argp is read from, but this would require describing its layout, and most people use a static initializer there, so it's not worth the effort. [1] https://www.gnu.org/software/libc/manual/html_node/Argp.html Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D143330
Showing
- compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc 20 additions, 0 deletions...rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
- compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h 1 addition, 0 deletions...rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
- compiler-rt/test/sanitizer_common/TestCases/Linux/argp_parse.c 60 additions, 0 deletions...ler-rt/test/sanitizer_common/TestCases/Linux/argp_parse.c
Loading
Please register or sign in to comment