# man man ================================================================= ==29769==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f7fffffe590 at pc 0x00000024986e bp 0x7f7fffffba90 sp 0x7f7fffffb208 READ of size 6 at 0x7f7fffffe590 thread T0 #0 0x24986d in printf_common(void*, char const*, __va_list_tag*) /public/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors_format.inc:548:9 #1 0x249a4c in __interceptor_vsnprintf /public/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1617:1 #2 0x24ae20 in __interceptor_snprintf /public/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1688:1 #3 0x220f6e in main (/usr/bin/man+0x20f6e) #4 0x220901 in ___start (/usr/bin/man+0x20901) Address 0x7f7fffffe590 is located in stack of thread T0 at offset 8560 in frame #0 0x220a7f in main (/usr/bin/man+0x20a7f) This frame has 10 object(s): [32, 288) 'buf.i468' [352, 2400) 'buf.i458' [2528, 3552) 'buf.i443' [3680, 3768) 'pg.i' [3808, 3960) 'sb.i' [4032, 6081) 'buf.i383' [6224, 6232) 'newname.i' [6256, 7280) 'buf.i' [7408, 7496) 'pg' [7536, 8816) 'utsname' <== Memory access at offset 8560 is inside this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-use-after-scope /public/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors_format.inc:548:9 in printf_common(void*, char const*, __va_list_tag*) Shadow bytes around the buggy address: 0x4feffffffc60: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffffc70: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffffc80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffffc90: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffffca0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 =>0x4feffffffcb0: f8 f8[f8]f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffffcc0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffffcd0: f8 f8 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 0x4feffffffce0: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 0x4feffffffcf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x4feffffffd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==29769==ABORTING # exit