================================================================= ==72083==ERROR: AddressSanitizer: heap-use-after-free on address 0x61900007b2b2 at pc 0x000107eee804 bp 0x00016b4d8200 sp 0x00016b4d79d0 READ of size 2 at 0x61900007b2b2 thread T0 #0 0x000107eee800 in strlen+0x22c (/Library/Developer/CommandLineTools/usr/lib/clang/21/lib/darwin/libclang_rt.asan_osx_dynamic.dylib:arm64e+0x16800) #1 0x000104fce5d4 in CopyLimitPrintoutLength+0x14 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006ae5d4) #2 0x000104fce168 in CopyFromErrorCallback+0x3f0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006ae168) #3 0x000106232688 in errfinish+0x3b4 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x101912688) #4 0x000104fe1c50 in NextCopyFrom+0x828 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006c1c50) #5 0x000104fd1494 in CopyFrom+0x2e14 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006b1494) #6 0x000104fc6a94 in DoCopy+0x1cdc (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006a6a94) #7 0x000105be9c54 in standard_ProcessUtility+0xe08 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c9c54) #8 0x00012562b614 in CallPreviousProcessUtility(PlannedStmt*, char const*, bool, ProcessUtilityContext, ParamListInfoData*, QueryEnvironment*, _DestReceiver*, QueryCompletion*)+0x94 (/Users/gowdham-23370/projects/deb17/pg17d/lib/postgresql/cstore_fdw.dylib:arm64+0x27614) #9 0x00012562955c in CStoreProcessUtility(PlannedStmt*, char const*, bool, ProcessUtilityContext, ParamListInfoData*, QueryEnvironment*, _DestReceiver*, QueryCompletion*)+0x730 (/Users/gowdham-23370/projects/deb17/pg17d/lib/postgresql/cstore_fdw.dylib:arm64+0x2555c) #10 0x000105be8e0c in ProcessUtility+0x258 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c8e0c) #11 0x000105be7820 in PortalRunUtility+0x2ec (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c7820) #12 0x000105be5174 in PortalRunMulti+0x874 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c5174) #13 0x000105be31d4 in PortalRun+0x958 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c31d4) #14 0x000105bd63ec in exec_simple_query+0xbe0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012b63ec) #15 0x000105bd48f0 in PostgresMain+0x1880 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012b48f0) #16 0x000105bc0b70 in BackendMain+0x288 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012a0b70) #17 0x0001058b243c in postmaster_child_launch+0x2f0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f9243c) #18 0x0001058c06b8 in BackendStartup+0x5b4 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100fa06b8) #19 0x0001058bbcf0 in ServerLoop+0x454 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f9bcf0) #20 0x0001058b9db8 in PostmasterMain+0x2e24 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f99db8) #21 0x000105439858 in main+0x774 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100b19858) #22 0x00018f89c4e0 in start+0x1b4c (/usr/lib/dyld:arm64e+0x204e0) 0x61900007b2b2 is located 50 bytes inside of 1072-byte region [0x61900007b280,0x61900007b6b0) freed by thread T0 here: #0 0x000107f19460 in realloc+0x80 (/Library/Developer/CommandLineTools/usr/lib/clang/21/lib/darwin/libclang_rt.asan_osx_dynamic.dylib:arm64e+0x41460) #1 0x00010630bda0 in MallocContextRealloc+0x94 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1019ebda0) #2 0x000106314f1c in repalloc+0x244 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1019f4f1c) #3 0x0001063ce2b8 in enlargeStringInfo+0x490 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x101aae2b8) #4 0x000104fe026c in CopyReadAttributesText+0x35c (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006c026c) #5 0x000104fddae8 in NextCopyFromRawFields+0xa88 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006bdae8) #6 0x000104fe1ba0 in NextCopyFrom+0x778 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006c1ba0) #7 0x000104fd1494 in CopyFrom+0x2e14 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006b1494) #8 0x000104fc6a94 in DoCopy+0x1cdc (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006a6a94) #9 0x000105be9c54 in standard_ProcessUtility+0xe08 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c9c54) #10 0x00012562b614 in CallPreviousProcessUtility(PlannedStmt*, char const*, bool, ProcessUtilityContext, ParamListInfoData*, QueryEnvironment*, _DestReceiver*, QueryCompletion*)+0x94 (/Users/gowdham-23370/projects/deb17/pg17d/lib/postgresql/cstore_fdw.dylib:arm64+0x27614) #11 0x00012562955c in CStoreProcessUtility(PlannedStmt*, char const*, bool, ProcessUtilityContext, ParamListInfoData*, QueryEnvironment*, _DestReceiver*, QueryCompletion*)+0x730 (/Users/gowdham-23370/projects/deb17/pg17d/lib/postgresql/cstore_fdw.dylib:arm64+0x2555c) #12 0x000105be8e0c in ProcessUtility+0x258 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c8e0c) #13 0x000105be7820 in PortalRunUtility+0x2ec (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c7820) #14 0x000105be5174 in PortalRunMulti+0x874 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c5174) #15 0x000105be31d4 in PortalRun+0x958 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c31d4) #16 0x000105bd63ec in exec_simple_query+0xbe0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012b63ec) #17 0x000105bd48f0 in PostgresMain+0x1880 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012b48f0) #18 0x000105bc0b70 in BackendMain+0x288 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012a0b70) #19 0x0001058b243c in postmaster_child_launch+0x2f0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f9243c) #20 0x0001058c06b8 in BackendStartup+0x5b4 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100fa06b8) #21 0x0001058bbcf0 in ServerLoop+0x454 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f9bcf0) #22 0x0001058b9db8 in PostmasterMain+0x2e24 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f99db8) #23 0x000105439858 in main+0x774 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100b19858) #24 0x00018f89c4e0 in start+0x1b4c (/usr/lib/dyld:arm64e+0x204e0) previously allocated by thread T0 here: #0 0x000107f19274 in malloc+0x78 (/Library/Developer/CommandLineTools/usr/lib/clang/21/lib/darwin/libclang_rt.asan_osx_dynamic.dylib:arm64e+0x41274) #1 0x00010630b75c in MallocContextAlloc+0x48 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1019eb75c) #2 0x000106313c3c in palloc+0x404 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1019f3c3c) #3 0x0001063cd4bc in initStringInfo+0x2c (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x101aad4bc) #4 0x000104fd72e0 in BeginCopyFrom+0x2514 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006b72e0) #5 0x000104fc6a88 in DoCopy+0x1cd0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006a6a88) #6 0x000105be9c54 in standard_ProcessUtility+0xe08 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c9c54) #7 0x00012562b614 in CallPreviousProcessUtility(PlannedStmt*, char const*, bool, ProcessUtilityContext, ParamListInfoData*, QueryEnvironment*, _DestReceiver*, QueryCompletion*)+0x94 (/Users/gowdham-23370/projects/deb17/pg17d/lib/postgresql/cstore_fdw.dylib:arm64+0x27614) #8 0x00012562955c in CStoreProcessUtility(PlannedStmt*, char const*, bool, ProcessUtilityContext, ParamListInfoData*, QueryEnvironment*, _DestReceiver*, QueryCompletion*)+0x730 (/Users/gowdham-23370/projects/deb17/pg17d/lib/postgresql/cstore_fdw.dylib:arm64+0x2555c) #9 0x000105be8e0c in ProcessUtility+0x258 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c8e0c) #10 0x000105be7820 in PortalRunUtility+0x2ec (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c7820) #11 0x000105be5174 in PortalRunMulti+0x874 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c5174) #12 0x000105be31d4 in PortalRun+0x958 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012c31d4) #13 0x000105bd63ec in exec_simple_query+0xbe0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012b63ec) #14 0x000105bd48f0 in PostgresMain+0x1880 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012b48f0) #15 0x000105bc0b70 in BackendMain+0x288 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1012a0b70) #16 0x0001058b243c in postmaster_child_launch+0x2f0 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f9243c) #17 0x0001058c06b8 in BackendStartup+0x5b4 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100fa06b8) #18 0x0001058bbcf0 in ServerLoop+0x454 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f9bcf0) #19 0x0001058b9db8 in PostmasterMain+0x2e24 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100f99db8) #20 0x000105439858 in main+0x774 (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x100b19858) #21 0x00018f89c4e0 in start+0x1b4c (/usr/lib/dyld:arm64e+0x204e0) SUMMARY: AddressSanitizer: heap-use-after-free (/Users/gowdham-23370/projects/deb17/pg17d/bin/postgres:arm64+0x1006ae5d4) in CopyLimitPrintoutLength+0x14 Shadow bytes around the buggy address: 0x61900007b000: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x61900007b080: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x61900007b100: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x61900007b180: fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa 0x61900007b200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x61900007b280: fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd 0x61900007b300: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x61900007b380: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x61900007b400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x61900007b480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x61900007b500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 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 ==72083==ABORTING