iu-parfunc / adaptive-data

0 stars 0 forks source link

Bug report from Chen #1

Open rrnewton opened 9 years ago

rrnewton commented 9 years ago

from @DreamLinuxer


I think the code: https://github.com/iu-parfunc/adaptive-data/blob/master/lockfree-test/src/Data/Concurrent/AdaptiveBag.hs does not preserve correct set semantics.

If initially the Hybrid state is "Pure _ [1, 2, 3]", and thread t1 started transition and success in line 76, and then thread t2 started a remove which according to line 66 it will go to SB which is empty so the remove will fail, however the set is not empty.

rrnewton commented 9 years ago

Here's a durable link to that specific revision, line 76:

https://github.com/iu-parfunc/adaptive-data/blob/71c3961a7633193bae969a557836a68e600f2a31/lockfree-test/src/Data/Concurrent/AdaptiveBag.hs#L76