|
2014-04-21
| ||
| 18:56 | • Closed ticket [99c02b9520]: iocmd-21.21 segfault demo & more plus 8 othe... artifact: 7482ba2d80 user: dgp | |
| 15:54 | • New ticket [99c02b9520]. artifact: 5c8914c5bc user: dgp | |
iocmd-21.21 segfault demo & more
Closed / Fixed99c02b9520069c3ecd4bc55ae3c5137488dcf15eCreated 13 years agoUpdated 13 years ago
Descriptionplain2014-04-21 15:54:41
New test iocmd-21.21 demonstrates a segfault. It's worse than that though. It demonstrates that reflected channels expose (create?) the ability to close a channel in the midst of operations on it. This means things can disappear, deallocate, invalidate, and go away, when everything in progress is assuming that will not happen. One particular problem is the routine ReflectInput(..., char *buf, int toRead, int *errorCodePtr); The buf pointer value passed in is where RI() is meant to write the bytes it reads. However the InvokeTclMethod() call inside RI() has the power to free that memory. iocmd-21.21 demonstrates this (and other problems), and valgrind will indeed report the "Invalid write" attempt. A number of potential solutions can be imagined, but they all seem unpleasant. Comments?
dgpplain2014-04-21 18:56:20
Fixed in 8.5 branch.
Log in (anonymous is fine) to add a comment.