https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67494
Bug ID: 67494 Summary: xsinfo sanitizer detects overlapping strings in assignment statement Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- The sanitizer detects overlapping strings in the assignemnt statement DR.Data (1 .. Source'Length) := Source; in a-strunb.adb:1456. The following is the sanitizer snapshot during gcc build (cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo sinfo.h ) Check for field name consistency OK Check for function consistency OK Check for missing functions OK Check for set procedure consistency OK Check for missing set procedures OK Check pragma Inlines are all for existing subprograms ================================================================= ==7358==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x60400001329c,0x6040000132aa) and [0x6040000132a0, 0x6040000132ae) overlap #0 0x2adcc5f71762 in __asan_memcpy ../../../../gcc-5.2.0/libsanitizer/asan/asan_interceptors.cc:365 #1 0x42bed0 in ada__strings__unbounded__set_unbounded_string /home/vitti/gcc-5.2.0-obj/gcc/ada/rts/a-strunb.adb:1456 #2 0x442c2a in gnat__spitbol__patterns__xmatch /home/vitti/gcc-5.2.0-obj/gcc/ada/rts/g-spipat.adb:4066 #3 0x4435ba in gnat__spitbol__patterns__match /home/vitti/gcc-5.2.0-obj/gcc/ada/rts/g-spipat.adb:2806 #4 0x40ae6e in _ada_csinfo (/home/vitti/1tb/vitti/gcc-5.2.0-undefined/gcc/ada/bldtools/sinfo/xsinfo+0x40ae6e) #5 0x41ba7f in _ada_xsinfo (/home/vitti/1tb/vitti/gcc-5.2.0-undefined/gcc/ada/bldtools/sinfo/xsinfo+0x41ba7f) #6 0x402b05 in main (/home/vitti/1tb/vitti/gcc-5.2.0-undefined/gcc/ada/bldtools/sinfo/xsinfo+0x402b05) #7 0x390da1ffdf in __libc_start_main (/lib64/libc.so.6+0x390da1ffdf) #8 0x4025f3 (/home/vitti/1tb/vitti/gcc-5.2.0-undefined/gcc/ada/bldtools/sinfo/xsinfo+0x4025f3) 0x60400001329c is located 12 bytes inside of 48-byte region [0x604000013290,0x6040000132c0) allocated by thread T0 here: #0 0x2adcc5f7d509 in __interceptor_malloc ../../../../gcc-5.2.0/libsanitizer/asan/asan_malloc_linux.cc:38 #1 0x458a10 in __gnat_malloc /home/vitti/gcc-5.2.0-obj/gcc/ada/rts/s-memory.adb:92 #2 0x60600006157f (<unknown module>) 0x6040000132a0 is located 16 bytes inside of 48-byte region [0x604000013290,0x6040000132c0) allocated by thread T0 here: #0 0x2adcc5f7d509 in __interceptor_malloc ../../../../gcc-5.2.0/libsanitizer/asan/asan_malloc_linux.cc:38 #1 0x458a10 in __gnat_malloc /home/vitti/gcc-5.2.0-obj/gcc/ada/rts/s-memory.adb:92 #2 0x60600006157f (<unknown module>) SUMMARY: AddressSanitizer: memcpy-param-overlap ../../../../gcc-5.2.0/libsanitizer/asan/asan_interceptors.cc:365 __asan_memcpy ==7358==ABORTING /home/vitti/gcc-5.2.0/gcc/ada/Make-generated.in:42: recipe for target 'ada/sinfo.h' failed