samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
663 stars 240 forks source link

bcftools-1.19: core dump in init_data() at plugins/split-vep.c:602 #2072

Closed mmokrejs closed 9 months ago

mmokrejs commented 9 months ago

Hi, the manual is a tough read for me so I evidently messed up with the commandline by addition of the ':info'.

Core was generated by `bcftools +split-vep -c Consequence,DPR:info,VAF,VAF1 -s worst'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f2fb40b5eef in parse_column_str (args=args@entry=0x555775e60be0) at plugins/split-vep.c:602
602                 *tp = 0;
(gdb) where
#0  0x00007f2fb40b5eef in parse_column_str (args=args@entry=0x555775e60be0) at plugins/split-vep.c:602
#1  0x00007f2fb40b8747 in init_data (args=0x555775e60be0) at plugins/split-vep.c:891
#2  run (argc=<optimized out>, argv=<optimized out>) at plugins/split-vep.c:1460
#3  0x0000555774954689 in main_plugin (argc=5, argv=0x7fff80ab1b60) at vcfplugin.c:669
#4  0x00007f2fb36e778a in ?? () from /lib64/libc.so.6
#5  0x00007f2fb36e7845 in __libc_start_main () from /lib64/libc.so.6
#6  0x0000555774889031 in _start ()
(gdb) 
   -c, --columns LIST[:type]   Extract the fields listed either as indexes or names. The default type
                                 of the new annotation is String but can be also Integer/Int or Float/Real.
pd3 commented 9 months ago

I am not sure what the DPR:info is supposed to be - was it a typo or is there a CSQ field named like that? Can you show the relevant header line please? The program should not segfault indeed, even when used incorrectly.

pd3 commented 9 months ago

This is now fixed, the program will print an error without segfaulting. Thank you for reporting the problem

mmokrejs commented 9 months ago

Thank you, you are faster fixing the code than me just answering. Yes, it was my misunderstanding of what I shall provide. A defensive sanity check is enough. Also an example in the documentation would be helpful, for dummies.