From: Gal Salomon Date: Mon, 26 May 2025 13:10:41 +0000 (+0300) Subject: investigate valgrind report for uninitialized variable X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fa6516bab4224157e4eebe3baf637920daead5b4;p=ceph.git investigate valgrind report for uninitialized variable -- a change in s3select-api signature; add codelines to verify that upon conditional-buffer-access, buffer is initialized. Signed-off-by: Gal Salomon --- diff --git a/src/rgw/rgw_s3select.cc b/src/rgw/rgw_s3select.cc index d8be76a6b1c04..6c0ab84116f9f 100644 --- a/src/rgw/rgw_s3select.cc +++ b/src/rgw/rgw_s3select.cc @@ -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; diff --git a/src/s3select b/src/s3select index 0a0f6d439441f..430e75e53b25c 160000 --- a/src/s3select +++ b/src/s3select @@ -1 +1 @@ -Subproject commit 0a0f6d439441f5b121ed1052dac54542e4f1d89b +Subproject commit 430e75e53b25ce18030921cd5bd4a572ec507394