Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22632 )
Change subject: IMPALA-13868: Fix ASAN build failed in test_ai_generate_text_exprs ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/22632/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/22632/1//COMMIT_MSG@15 PS1, Line 15: This issue was introduced by IMPALA-13565 The heap-use-after-free issue happen in expr-test. But which test exactly? AiFunctionsTest? http://gerrit.cloudera.org:8080/#/c/22632/1/be/src/exprs/ai-functions.cc File be/src/exprs/ai-functions.cc: http://gerrit.cloudera.org:8080/#/c/22632/1/be/src/exprs/ai-functions.cc@121 PS1, Line 121: ParseImpalaOptions nit: I was confused at first when the patch mention Options. I thought it was Query Options. There must be a better name for this that is less ambiguous. http://gerrit.cloudera.org:8080/#/c/22632/1/be/src/exprs/ai-functions.cc@130 PS1, Line 130: string(reinterpret_cast<const char*>(options.ptr), options.len) I found this code comment about StringVal. /// Construct a StringVal from NULL-terminated c-string. Note: this does not make a /// copy of ptr so the underlying string must exist as long as this StringVal does. StringVal(const char* ptr) : len(strlen(ptr)), ptr(const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(ptr))) {} 2 questions: 1. If options.ptr is a pointer to a NULL-terminated c-string, why it matters between code before and after patch? 2. Is it possible that the underlying string is already gone/freed at this point? -- To view, visit http://gerrit.cloudera.org:8080/22632 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9f4656e256bb9b31acc2653c3b910788ddf03f2b Gerrit-Change-Number: 22632 Gerrit-PatchSet: 1 Gerrit-Owner: Yida Wu <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Comment-Date: Mon, 17 Mar 2025 15:18:59 +0000 Gerrit-HasComments: Yes
