-
Notifications
You must be signed in to change notification settings - Fork 24
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
Inconsistent results from qsort callback #11
Comments
Thanks, I agree. We'll have a look. |
Thanks, yugr. This has been fixed in the develop branch as of commit 2c83262. The fix will be included as part of the next release (which will be the next commit on master), but it is currently unclear when that will be. For changes responsible for the fix, see: Ignore the addition of the bug-i47.pl script -- that is unrelated. |
cryptogenomicon
added a commit
to EddyRivasLab/hmmer
that referenced
this issue
Nov 7, 2018
A qsort() helper function needs to return 0 when its keys are equal. We had multiple places where qsort helpers are only returning -1/1. First reported in EddyRivasLab/infernal#11 by Yuri Gribov (yugr), author of SortCheck. In May 2018, EPN committed Infernal fixes, and sent a pull request (#139) with H3 fixes. Belatedly, here are the analogous H4 fixes. Also, adds -L flag to the find's in makeTAGS.sh, so the TAGS file includes lib/easel when that's a symlink.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
qsort
callbackhit_sorter_by_evalue
may return random result when input structs have all compared fields equal. This in turn may causes inconsistent order or even crashes in some qsort implementations.The issue has been detected when running standard testsuite under SortChecker:
Closer examination in debugger reveals that
hit_sorter_by_evalue
returns returns the same value for equal results:The fix is simply to replace final comparison
with
A similar issue seems to exist in most other
hit_sorter*
callbacks .The text was updated successfully, but these errors were encountered: