lidavidm commented on pull request #10259:
URL: https://github.com/apache/arrow/pull/10259#issuecomment-833699168


   > LGTM, is the test case related though? It think it's a good case to have 
but just want to check my understanding.
   
   Yes - the test case, with the old code, would cause a use-after-free (since 
the callback in CountRows would run and try to append to a vector on the stack 
which doesn't exist anymore). I decided I couldn't capture the original failure 
effectively in a unit test (two callbacks run concurrently and interleave their 
calls to push_back) but both are symptoms of the same thing (don't take shared 
state by reference and then try to use it concurrently!).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to