djvm -d makes a djvu file unreadable. Old versions (such as 3.5.24) do not this problem.
I have tried different git revisions. Revision 26d4ce does not have the problem, and 58a02f has the problem.
This may be caused by a small mistake in the new atomic.h introduced in that revision. Changing "return ov + 1" to "return ov - 1" at line 125 of libdjvu/atomic.h solves the problem. (This line number 125 is for both 58a02f and the newest version daeac3.) The change makes atomicDecrement return original_value-1 instead of original_value+1.
Log in to post a comment.