llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.82k stars 11.46k forks source link

I cannot get line numbers through llvm-symbolizer #92491

Open CoolCaicaixian opened 3 months ago

CoolCaicaixian commented 3 months ago

PS C:\Users\meitu\work\mutithreadDemo\build\Debug> .\demo_exe.exe begin...

==22684==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x003465f9f7d0 at pc 0x7ff7d5622771 bp 0x003465f9f600 sp 0x003465f9f608 WRITE of size 4 at 0x003465f9f7d0 thread T0

0 0x7ff7d5622770 (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140002770)

#1 0x7ff7d5643ed8  (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023ed8)
#2 0x7ff7d5643e2d  (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023e2d)
#3 0x7ff7d5643ced  (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023ced)
#4 0x7ff7d5643f4d  (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023f4d)
#5 0x7ff8be18257c  (C:\Windows\System32\KERNEL32.DLL+0x18001257c)
#6 0x7ff8bf64aa47  (C:\Windows\SYSTEM32\ntdll.dll+0x18005aa47)

Address 0x003465f9f7d0 is located in stack of thread T0 at offset 432 in frame

0 0x7ff7d56224ff (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x1400024ff)

This frame has 4 object(s): [32, 432) 'x' [48, 296) 'thread_pool' [64, 88) 'compiler temporary' [80, 96) 'future' <== Memory access at offset 432 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp, SEH and C++ exceptions are supported) SUMMARY: AddressSanitizer: stack-buffer-overflow (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140002770) Shadow bytes around the buggy address: 0x018a5cc73ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73eb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73ec0: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 0x018a5cc73ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x018a5cc73ef0: 00 00 00 00 00 00 00 00 00 00[f2]f2 f2 f2 00 00 0x018a5cc73f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 0x018a5cc73f20: f2 f2 00 00 00 f2 f2 f2 f2 00 00 f3 f3 f3 f3 00 0x018a5cc73f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73f40: 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 ==22684==ABORTING PS C:\Users\meitu\work\mutithreadDemo\build\Debug> llvm-symbolizer.exe --obj=C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe 0x7ff7d5622770 LLVMSymbolizer: error reading file: 'C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.pdb': no such file or directory ?? ??:0:0

PS C:\Users\meitu\work\mutithreadDemo\build\Debug> llvm-symbolizer.exe --obj=C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe 0x7ff7d5622770

??:0:0

CoolCaicaixian commented 3 months ago

截屏2024-05-17 11 34 53

llvmbot commented 3 months ago

@llvm/issue-subscribers-tools-llvm-symbolizer

Author: Caicaixian (CoolCaicaixian)

PS C:\Users\meitu\work\mutithreadDemo\build\Debug> .\demo_exe.exe begin... ================================================================= ==22684==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x003465f9f7d0 at pc 0x7ff7d5622771 bp 0x003465f9f600 sp 0x003465f9f608 WRITE of size 4 at 0x003465f9f7d0 thread T0 #0 0x7ff7d5622770 (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140002770) #1 0x7ff7d5643ed8 (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023ed8) #2 0x7ff7d5643e2d (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023e2d) #3 0x7ff7d5643ced (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023ced) #4 0x7ff7d5643f4d (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140023f4d) #5 0x7ff8be18257c (C:\Windows\System32\KERNEL32.DLL+0x18001257c) #6 0x7ff8bf64aa47 (C:\Windows\SYSTEM32\ntdll.dll+0x18005aa47) Address 0x003465f9f7d0 is located in stack of thread T0 at offset 432 in frame #0 0x7ff7d56224ff (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x1400024ff) This frame has 4 object(s): [32, 432) 'x' [48, 296) 'thread_pool' [64, 88) 'compiler temporary' [80, 96) 'future' <== Memory access at offset 432 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp, SEH and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow (C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe+0x140002770) Shadow bytes around the buggy address: 0x018a5cc73ea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73eb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73ec0: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 0x018a5cc73ed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73ee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x018a5cc73ef0: 00 00 00 00 00 00 00 00 00 00[f2]f2 f2 f2 00 00 0x018a5cc73f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73f10: 00 00 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 0x018a5cc73f20: f2 f2 00 00 00 f2 f2 f2 f2 00 00 f3 f3 f3 f3 00 0x018a5cc73f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x018a5cc73f40: 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 ==22684==ABORTING PS C:\Users\meitu\work\mutithreadDemo\build\Debug> llvm-symbolizer.exe --obj=C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe 0x7ff7d5622770 LLVMSymbolizer: error reading file: 'C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.pdb': no such file or directory ?? ??:0:0 PS C:\Users\meitu\work\mutithreadDemo\build\Debug> llvm-symbolizer.exe --obj=C:\Users\meitu\work\mutithreadDemo\build\Debug\demo_exe.exe 0x7ff7d5622770 ??:0:0
dwblaikie commented 3 months ago

@zmodem perhaps you've got some ideas/someone who'd be interested in this