Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in mendelian plugin when passing incomplete trio #1520

Closed
ASLeonard opened this issue Jun 30, 2021 · 1 comment
Closed

Segfault in mendelian plugin when passing incomplete trio #1520

ASLeonard opened this issue Jun 30, 2021 · 1 comment

Comments

@ASLeonard
Copy link

Hi,
This is probably not a common use case, so may just be a usage error.

Running bcftools +mendelian vcf -t missing,father_ID,child_ID with say only 2 samples (mother/child or father/child) will sometimes work fine and sometimes result in a segfault. I couldn't pin down why the segfault only seems to happen with some vcfs, but the offending line is here, where bcf_hdr_int2id is called on a nonexistent sample (passed as "missing" in the command line for option '-t').

I am again unsure why this works sometimes and not others, but by replacing the bcf_hdr_int2id calls directly with mother/father/child allows the program to complete. I feel like all cases with only 2 names should segfault, as the respective code in htslib is #define bcf_hdr_int2id(hdr,type,int_id) ((hdr)->id[type][int_id].key).

Using

bcftools 1.12-1-g9aeb1aa-dirty
Using htslib 1.12-1-g9672589-dirty

Thanks,
Alex

@pd3 pd3 closed this as completed in a2fab1a Jul 1, 2021
@pd3
Copy link
Member

pd3 commented Jul 1, 2021

Thank you for the bug report, this is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants