Energy-Languages
Energy-Languages copied to clipboard
C fasta is broken
fasta implementation for C is broken; "Segmentation fault"
Seems related to this call:
generate_And_Wrap_Pseudorandom_DNA_Sequence(iub_Nucleotides_Information,
sizeof(iub_Nucleotides_Information) / sizeof(nucleotide_info), 3 * n);
Compiling and running with address sanitizer does not raise any issues:
gcc -g -fsanitize=address -fsanitize=undefined -pipe -Wall -O3 -fomit-frame-pointer -march=native -std=c99 -mfpmath=sse -msse3 -fopenmp fasta.gcc-2.c -o fasta.gcc-2.gcc_run && ./fasta.gcc-2.gcc_run 25000000 > /dev/null
Valgrind does not find any issues either. But on the first attempt, I tried to run the program without a parameter and it segfaulted here:
https://github.com/greensoftwarelab/Energy-Languages/blob/1356528173d6bb07fb2512037c0ed8e2279ce440/C/fasta/fasta.gcc-2.c#L311
Was that perhaps the issue for you as well?