-
- Downloads
Change bsdiff's suffix sort algorithm to sais. Fixes #132
Although #132 is marked as closed, the issue is still real. bsdiff can crash or hang when creating diffs on some files. In particular, bsdiff hangs/crashes in its recursive split function. As you can see from: http://stackoverflow.com/a/20305493/871119 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409664 bsdiff 4.3 uses qsufsort for its suffix sorting algorithm, which has a bug causing the hanging/crashing. Our solution is to change the algorithm to use sais for suffix sorting: https://sites.google.com/site/yuta256/sais Notes: *I had to change sais_index_type #define from int to off_t in sais.h/c and in some other places, to eliminate all warnings. Compiles cleanly with clang's -Weverything *sais is claimed to be more efficient than other algorithms including qsufsort. If a more efficient (and stable) algorithm comes out, we may be able to swap it out in the future.
Showing
- LICENSE 3 additions, 0 deletionsLICENSE
- Sparkle.xcodeproj/project.pbxproj 6 additions, 0 deletionsSparkle.xcodeproj/project.pbxproj
- Vendor/bsdiff/bsdiff.c 2 additions, 133 deletionsVendor/bsdiff/bsdiff.c
- Vendor/bsdiff/sais.c 534 additions, 0 deletionsVendor/bsdiff/sais.c
- Vendor/bsdiff/sais.h 59 additions, 0 deletionsVendor/bsdiff/sais.h
Loading
Please register or sign in to comment