================================================================= ==339==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f7fffffc6c8 at pc 0x0000004476bd bp 0x7f7fffffbd90 sp 0x7f7fffffb530 READ of size 11 at 0x7f7fffffc6c8 thread T0 #0 0x4476bc in strcpy (/usr/bin/tmux+0x2476bc) #1 0x7f7ff7022eb5 in openpty (/usr/lib/libutil.so.7+0x22eb5) #2 0x7f7ff70230f5 in forkpty (/usr/lib/libutil.so.7+0x230f5) #3 0x38fe3f in window_pane_spawn (/usr/bin/tmux+0x18fe3f) #4 0x38edd3 in window_create_spawn (/usr/bin/tmux+0x18edd3) #5 0x338cd4 in session_new (/usr/bin/tmux+0x138cd4) #6 0x338629 in session_create (/usr/bin/tmux+0x138629) #7 0x2a30b9 in cmd_new_session_exec (/usr/bin/tmux+0xa30b9) #8 0x2a680c in cmdq_next (/usr/bin/tmux+0xa680c) #9 0x33283d in server_loop (/usr/bin/tmux+0x13283d) #10 0x30c80d in proc_loop (/usr/bin/tmux+0x10c80d) #11 0x331747 in server_start (/usr/bin/tmux+0x131747) #12 0x290da7 in client_main (/usr/bin/tmux+0x90da7) #13 0x3476ee in main (/usr/bin/tmux+0x1476ee) #14 0x28a191 in ___start (/usr/bin/tmux+0x8a191) Address 0x7f7fffffc6c8 is located in stack of thread T0 at offset 2344 in frame #0 0x7f7ff70228cf in openpty (/usr/lib/libutil.so.7+0x228cf) This frame has 5 object(s): [32, 43) 'line' (line 66) [64, 96) 'grs' (line 71) [128, 136) 'grp' (line 71) [160, 1184) 'grbuf' (line 72) [1312, 3368) 'pt' (line 81) <== Memory access at offset 2344 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 (/usr/bin/tmux+0x2476bc) in str cpy Shadow bytes around the buggy address: 0x4feffffff880: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff890: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8a0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8b0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8c0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 =>0x4feffffff8d0: f8 f8 f8 f8 f8 f8 f8 f8 f8[f8]f8 f8 f8 f8 f8 f8 0x4feffffff8e0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8f0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff900: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff910: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff920: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 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 ==339==ABORTING -------------------------------------------- ================================================================= ==18700==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f7fffffc5a8 at pc 0x0000004476bd bp 0x7f7fffffbc70 sp 0x7f7fffffb410 READ of size 11 at 0x7f7fffffc5a8 thread T0 #0 0x4476bc in strcpy /public/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:424:5 #1 0x7f7ff7022eb5 in openpty /public/src.git/lib/libutil/pty.c:124:12 #2 0x7f7ff70230f5 in forkpty /public/src.git/lib/libutil/pty.c:149:6 #3 0x38fe3f in window_pane_spawn /public/src.git/external/bsd/tmux/dist/window.c:928:20 #4 0x38edd3 in window_create_spawn /public/src.git/external/bsd/tmux/dist/window.c:345:6 #5 0x338cd4 in session_new /public/src.git/external/bsd/tmux/dist/session.c:371:6 #6 0x338629 in session_create /public/src.git/external/bsd/tmux/dist/session.c:178:8 #7 0x2a30b9 in cmd_new_session_exec /public/src.git/external/bsd/tmux/dist/cmd-new-session.c:254:6 #8 0x2a680c in cmdq_fire_command /public/src.git/external/bsd/tmux/dist/cmd-queue.c:235:11 #9 0x2a680c in cmdq_next /public/src.git/external/bsd/tmux/dist/cmd-queue.c:354 #10 0x33283d in server_loop /public/src.git/external/bsd/tmux/dist/server.c:223:14 #11 0x30c80d in proc_loop /public/src.git/external/bsd/tmux/dist/proc.c:200:42 #12 0x331747 in server_start /public/src.git/external/bsd/tmux/dist/server.c:201:2 #13 0x290da7 in client_connect /public/src.git/external/bsd/tmux/dist/client.c:159:8 #14 0x290da7 in client_main /public/src.git/external/bsd/tmux/dist/client.c:267 #15 0x3476ee in main /public/src.git/external/bsd/tmux/dist/tmux.c:351:7 #16 0x28a191 in ___start (/usr/bin/tmux+0x8a191) Address 0x7f7fffffc5a8 is located in stack of thread T0 at offset 2344 in frame #0 0x7f7ff70228cf in openpty /public/src.git/lib/libutil/pty.c:65 This frame has 5 object(s): [32, 43) 'line' (line 66) [64, 96) 'grs' (line 71) [128, 136) 'grp' (line 71) [160, 1184) 'grbuf' (line 72) [1312, 3368) 'pt' (line 81) <== Memory access at offset 2344 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/asan_interceptors.cc:424:5 in strcpy Shadow bytes around the buggy address: 0x4feffffff860: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff870: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff880: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff890: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8a0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 =>0x4feffffff8b0: f8 f8 f8 f8 f8[f8]f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8c0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8d0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8e0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff8f0: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x4feffffff900: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 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 ==18700==ABORTING