smarco / WFA-paper

Wavefront alignment algorithm (WFA): Fast and exact gap-affine pairwise alignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stack smashing on small test sets using align_benchmark

ekg opened this issue · comments

I was basically fuzzing the test harness by trying to align long sequences:

( for i in $(seq 4650 1 5000); do echo @ $i; ../bin/generate_dataset -n 50 -l $i -e 0.05 -o sample.dataset.seq && ../bin/align_benchmark -i sample.dataset.seq -a gap-affine-wfa >/dev/null ; echo done @ $i ; done )

This starts to fail as the sequence length increases.

It seems it starts to break down around 4700bp, and then it consistently reports "stack smashing" for every greater length. It seems fine less than 4600 or so.

I'm on gcc 9.3.0.

I don't get the same problem with gap-affine-wfa-adaptive.

Actually, it starts to fail between 50 and 60k, and always fails after 65536. This is on master.

Maybe earlier, it's hard to tell:

( for i in $(seq 30000 1000 65536); do echo @ $i; ../bin/generate_dataset -n 50 -l $i -e 0.05 -o sample.dataset.seq && ../bin/align_benchmark -i sample.dataset.seq -a gap-affine-wfa-adaptive >/dev/null ; echo done @ $i ; done )

My bad. I updated the memory allocator (mm_allocator.c) very recently and it had a bug. I pushed a fix.
The reason it doesn't show up using gap-affine-wfa-adaptive is because it uses much less memory.

Thanks so much for pushing the WFA to the limit. I really appreciate.