]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
investigate valgrind report for uninitialized variable valgrind_uninitialized_variable 63482/head
authorGal Salomon <gal.salomon@gmail.com>
Mon, 26 May 2025 13:10:41 +0000 (16:10 +0300)
committerGal Salomon <gal.salomon@gmail.com>
Mon, 26 May 2025 13:10:41 +0000 (16:10 +0300)
-- a change in s3select-api signature; add codelines to verify that upon conditional-buffer-access, buffer is initialized.

Signed-off-by: Gal Salomon <gal.salomon@gmail.com>
src/rgw/rgw_s3select.cc
src/s3select

index d8be76a6b1c045c295f83ab3fc7e853c3de08cca..6c0ab84116f9f458bcbd467e91dbd8fe3d37515b 100644 (file)
@@ -928,6 +928,15 @@ int RGWSelectObj_ObjStore_S3::csv_processing(bufferlist& bl, off_t ofs, off_t le
     ldpp_dout(this, 10) << "s3select: chunk:  ofs = " << ofs << " len = " << len << " it.length() = " << it.length() << " m_object_size_for_processing = " << m_object_size_for_processing << dendl;
     
     m_aws_response_handler.update_processed_size(it.length());//NOTE : to run analysis to validate len is aligned with m_processed_bytes
+    
+    //NOTE: checking valgrind report for uninitialized read
+    const char* c = &(it)[0] + ofs + it.length() - 1;
+    if (*c=='a'){
+                 ldpp_dout(this, 10) << "s3select: last char is 'a' in the chunk, ofs = " << ofs << " len = " << len << " it.length() = " << it.length() << dendl;
+               } else {
+                 ldpp_dout(this, 10) << "s3select: last char is not 'a' in the chunk, ofs = " << ofs << " len = " << len << " it.length() = " << it.length() << dendl;
+               }
+
     status = run_s3select_on_csv(m_sql_query.c_str(), &(it)[0] + ofs, it.length());
     if (status<0) {
          return -EINVAL;
index 0a0f6d439441f5b121ed1052dac54542e4f1d89b..430e75e53b25ce18030921cd5bd4a572ec507394 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0a0f6d439441f5b121ed1052dac54542e4f1d89b
+Subproject commit 430e75e53b25ce18030921cd5bd4a572ec507394