Menu

#171 Patch to fix dictionary cache crash.

closed-fixed
nobody
None
7
2011-07-02
2011-05-17
No

There is a crash because two threads are allowed to update the dictionary cache at the same time.

This patch applies a lock to prevent this.

Discussion

  • Stephen J. Muir

    Stephen J. Muir - 2011-05-17
     
  • Kevin Atkinson

    Kevin Atkinson - 2011-05-17
    • priority: 5 --> 7
     
  • Kevin Atkinson

    Kevin Atkinson - 2011-06-26
     
  • Kevin Atkinson

    Kevin Atkinson - 2011-06-26

    While I agree there is likely a problem, I don't think getting the lock in speller_impl is the right place. Please try the attached patch (better_dict_cache_lock.patch) and let me know if it fixes the problem.

     
  • Kevin Atkinson

    Kevin Atkinson - 2011-07-02
    • milestone: 660004 -->
    • status: open --> closed-fixed
     
  • Kevin Atkinson

    Kevin Atkinson - 2011-07-02

    Attached is the patch as applied to CVS. I am now 99% sure the patch is doing the right thing, The fact that I didn't get a lock when using the dictionary cache is an oversight. Normally get_cache_data is used which gets the lock for you, but in this case I am doing something slightly unusual so I didn't use that function.

    Thank you for finding it, it was likely causing other mysterious, hard to find, crashes in multi-threaded uses of Aspell.

     
  • Kevin Atkinson

    Kevin Atkinson - 2011-07-02

    Fix, as applied to CVS.

     
  • Kevin Atkinson

    Kevin Atkinson - 2011-07-04

    This bug is now fixed (or patch applied) in Aspell 0.60.6.1 which is now Available.