cyb70289 commented on code in PR #13250:
URL: https://github.com/apache/arrow/pull/13250#discussion_r884272803


##########
cpp/src/arrow/io/buffered_test.cc:
##########
@@ -293,6 +293,14 @@ TEST_F(TestBufferedOutputStream, Tell) {
 
   ASSERT_OK(buffered_->Close());
 
+  // write large buffer after raw_pos is cached
+  OpenBuffered(3, false);
+  AssertTell(0);
+  ASSERT_OK(buffered_->Write(std::string(10, '0').data(), 5));

Review Comment:
   Looks to me this code is deferencing a dangling pointer. Please define a 
string variable.



##########
cpp/src/arrow/io/buffered_test.cc:
##########
@@ -293,6 +293,14 @@ TEST_F(TestBufferedOutputStream, Tell) {
 
   ASSERT_OK(buffered_->Close());
 
+  // write large buffer after raw_pos is cached
+  OpenBuffered(3, false);

Review Comment:
   `OpenBuffered(/*buffer_size=*/3);` should make it easier to catch the intent 
of this test.
   



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to