darked89 / geneidc

Predict splice sites, exons or genes, in eukaryotic genomic DNA sequences
0 stars 0 forks source link

AddressSanitizer: strcpy-param-overlap: memory ranges src/BackupGenes.c #2

Open darked89 opened 5 years ago

darked89 commented 5 years ago

While running geneid compiled with gcc 9.1.0 with -fsanitize=address

./bin/geneid  -GP param/dictyostelium.param ./samples/dict_1chr.fa
=================================================================
==29498==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7fd8e204c5b5,0x7fd8e204c5b8) and [0x7fd8e204c5b5, 0x7fd8e204c5b8) overlap
    #0 0x7fd9d5c53552 in __interceptor_strcpy /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:429
    #1 0x560a23e5268c in backupExon src/BackupGenes.c:65
    #2 0x560a23e539ce in backupGene src/BackupGenes.c:123
    #3 0x560a23e54c61 in BackupArrayD src/BackupGenes.c:216
    #4 0x560a23e5197b in main src/geneid.c:532
    #5 0x7fd9d4f6aee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)
    #6 0x560a23e5046d in _start (/home/darked89/proj_soft/geneidc/crg_github/geneid/bin/geneid+0x1c46d)

0x7fd8e204c5b5 is located 3874229 bytes inside of 37337552-byte region [0x7fd8e1c9a800,0x7fd8e40361d0)
allocated by thread T0 here:
    #0 0x7fd9d5cc6ce8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x560a23ea1738 in RequestMemoryDumpster src/RequestMemory.c:801
    #2 0x560a23e50afd in main src/geneid.c:268
    #3 0x7fd9d4f6aee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)

0x7fd8e204c5b5 is located 3874229 bytes inside of 37337552-byte region [0x7fd8e1c9a800,0x7fd8e40361d0)
allocated by thread T0 here:
    #0 0x7fd9d5cc6ce8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x560a23ea1738 in RequestMemoryDumpster src/RequestMemory.c:801
    #2 0x560a23e50afd in main src/geneid.c:268
    #3 0x7fd9d4f6aee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)

SUMMARY: AddressSanitizer: strcpy-param-overlap /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cc:429 in __interceptor_strcpy
==29498==ABORTING
darked89 commented 5 years ago

Link to stackoverflow:

https://stackoverflow.com/questions/58217308/fixing-addresssanitizer-strcpy-param-overlap-with-memmove

Needs to be implemented in the code.

darked89 commented 4 years ago

While above stackoverflow "fixes" the reported error, the problem is with zero sized destination. No space to store anything in zero bit.

darked89 commented 4 years ago

The problem does not show up unless the fasta sequence (contig?) is way above 2399940 nucleotides. d->dumpSites[d->ndumpSites].subtype