fork-helper icon indicating copy to clipboard operation
fork-helper copied to clipboard

SharedMemory::addException() is not atomic

Open duncan3dc opened this issue 6 years ago • 3 comments

If two forks are adding an exception at the same time, it's possible that they both read the current memory segment, then whichever thread writes second overwrites the first threads addition.

This isn't a major issue as at least an exception will always be reported when one has occurred, but if multiple occur we may miss the details of one (this is probably the cause of the occasional test failure we see on Travis

duncan3dc avatar Jan 10 '19 11:01 duncan3dc

Hi, do you have an example of this error?

I would like to analyze it! I am interested in using your project.

danielspk avatar Aug 27 '19 15:08 danielspk

What type of example are you looking for? Is the one in the current test suite not suitable?

duncan3dc avatar Aug 27 '19 15:08 duncan3dc

Yes, sorry I didn't see it

danielspk avatar Aug 27 '19 15:08 danielspk