In posix_execute, when iterating through the data sources, ds is advanced to ds->item.next in the for loop. But if the data source was removed (and freed) it isn't safe to access it directly in the for loop. I believe the "next" value should be cached before calling the "process" callback, like in the embedded run loop.
What version of the product are you using? On what operating system? Present in the latest r2640.
Comment #1
Posted on Jun 16, 2014 by Swift OxHi. I've implemented the new linked_list_iterator and used it in run_loop_posix. Could you repeat your test? There's also a unit test in test/linked_list that tries various actions to break it in case you think I've missed a special corner case.
Comment #2
Posted on Jun 17, 2014 by Swift DogI've repeated my tests with the new linked_list_iterator and it seems to be working good (I didn't run the unit tests as I don't have cpputest configured). Thanks.
Status: Fixed
Labels:
Type-Defect
Priority-High