#231 djvm delete page makes file broken (because of a mistake in atomic.h)

djvulibre
closed
nobody
None
5
2014-04-06
2014-03-29
tarlou
No

Problem:
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.

Possible solution?:
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.

Discussion

  • Leon Bottou

    Leon Bottou - 2014-04-06

    Fixed

     
  • Leon Bottou

    Leon Bottou - 2014-04-06
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks