[+] libyuv detects kCpuHasERMS — CopyRow_ERMS will be used. [+] src = [0x712c153ff000 .. 0x712c953ff000) guard @ 0x712c953ff000 [+] dst = [0x712b953fe000 .. 0x712c153fe000) guard @ 0x712c153fe000 [+] Calling libyuv::CopyPlane(src, 131072, dst, 131072, width=131072, height=16384) contract: copy exactly 2147483648 bytes (== width*height) and return bug: width *= height wraps 131072*16384 = 0x80000000 to INT_MIN; CopyRow_ERMS sign-extends to rcx=0xFFFFFFFF80000000 and rep movsb runs OOB. AddressSanitizer:DEADLYSIGNAL ================================================================= ==3866==ERROR: AddressSanitizer: SEGV on unknown address 0x712c953ff000 (pc 0x571c4a8eaeb6 bp 0x7ffcfcf30550 sp 0x7ffcfcf30550 T0) ==3866==The signal is caused by a READ memory access. #0 0x571c4a8eaeb6 in CopyRow_ERMS ../../third_party/libyuv/source/row_gcc.cc:6583:7 #1 0x571c4a809d60 in CopyPlane ../../third_party/libyuv/source/planar_functions.cc:95:5 #2 0x571c4a7e60ee in main /poc-artifacts/libyuv_copyplane_poc.cc:105:3 #3 0x752c98423249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) #4 0x752c98423304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) #5 0x571c4a6ffdc0 in _start (/poc-artifacts/libyuv_copyplane_poc+0x88dc0) ==3866==Register values: rax = 0x0000712c153ff000 rbx = 0x0000000080000000 rcx = 0xffffffff00000000 rdx = 0x0000000080000000 rdi = 0x0000712c153fe000 rsi = 0x0000712c953ff000 rbp = 0x00007ffcfcf30550 rsp = 0x00007ffcfcf30550 r8 = 0x0000571c4a8eaea0 r9 = 0x0000571c4a8eae30 r10 = 0x00007ffcfcf2e2ae r11 = 0x0000000000000202 r12 = 0x0000000000000000 r13 = 0x0000712b953fe000 r14 = 0x0000712c153ff000 r15 = 0x0000571c4a8eaea0 AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ../../third_party/libyuv/source/row_gcc.cc:6583:7 in CopyRow_ERMS ==3866==ABORTING