sriramlab / FAME

This is the software for FAst Marginal Epistasis test (FAME)
MIT License
1 stars 3 forks source link

Bug: double free detected in tcache 2 #2

Closed scienception closed 6 days ago

scienception commented 3 weeks ago

When running the sample provided either multi or single bin I get the following error:

free(): double free detected in tcache 2
Aborted

Any idea where this might be coming from? I'm using gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

This is the complete output:

-g
-p
-gxgbin
-snp
-tp
-k
-jn
-o
-annot
#SNP in bim file 100
100 SNPs in 0-th bin
 Number of selected SNPs w.r.t  annot file : 100
Number of SNPs per block : 10
200
free(): double free detected in tcache 2
./test.sh: line 7: 23677 Aborted                 ../../build/GENIE_GxG -g $gen -p $phen -gxgbin 0 -snp -1 -tp $target -k 10 -jn 10 -o small.single.results -annot $annot

NOTE: this is in branch extTarget, the main branch does work.

scienception commented 2 weeks ago

I submitted a pull request with a possible workaround, could you please check it is correct? Thank you!

FBoyang commented 6 days ago

Hi, thank you for detecting this bug and providing the suggestion. I confirm the bug was due to the undefined behavior without "return" in the read_target function. This issue was not displayed at GCC <= 7.5.0. I have accepted your commit request