seg fault for reheader -o

Open
#2,311 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c
Domain
cli

Research direction

Start by reproducing the bcftools reheader command with an unwritable output directory and with a nonexistent directory. Trace the reheader entry point and its output-file error path; done means these cases return a clear error without a segmentation fault, with regression coverage for both conditions.

Written by the indexing model from the issue text.

Description

requires-test-case

Hello, I want to change the sample name of .g.vcf.gz files, and it threw seg fault.
bcftools reheader -s <(echo "old_name" "new_name") -o folder/output.g,vcf.gz input.g.vcf.gz
But i found the problem is permission denied by 'folder', i also tested it with no existing folder path, it threw seg fault too.

The bcftools version is :
bcftools 1.21
Using htslib 1.21
Copyright (C) 2024 Genome Research Ltd.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Dominant language
C
Stars
891
Forks
277
Avg merge
2d 23h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/bcftools

All issues in samtools/bcftools

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.