[
https://issues.apache.org/jira/browse/IMPALA-13812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936929#comment-17936929
]
ASF subversion and git services commented on IMPALA-13812:
----------------------------------------------------------
Commit 627bbdd2a436ecb1a62825976f6afc2903395af1 in impala's branch
refs/heads/master from Yida Wu
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=627bbdd2a ]
IMPALA-13868: Fix ASAN build failed in test_ai_generate_text_exprs
In ParseImpalaOptions(), when the input options cannot be parsed,
the error message is constructed incorrectly by directly using the
StringVal pointer without considering its length. This may result
in reading beyond the allocated memory, leading to unexpected
behavior.
This issue was introduced by IMPALA-13565 and triggered ASAN
errors due to new test cases added in IMPALA-13812
(query_test/test_exprs.py). While IMPALA-13565 included unit
tests (AiFunctionsTest in expr-test.cc) for this code, the
newly added ee tests test_ai_generate_text_exprs() in
IMPALA-13812 run in parallel, making it much easier to trigger
this issue.
The patch fixes the issue by ensuring the error message is
constructed using both the pointer and its length.
Tests:
Passed the ASAN build tests.
Change-Id: I9f4656e256bb9b31acc2653c3b910788ddf03f2b
Reviewed-on: http://gerrit.cloudera.org:8080/22632
Reviewed-by: Riza Suminto <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Fail query for certain errors related to AI functions
> -----------------------------------------------------
>
> Key: IMPALA-13812
> URL: https://issues.apache.org/jira/browse/IMPALA-13812
> Project: IMPALA
> Issue Type: Task
> Reporter: Abhishek Rawat
> Assignee: Yida Wu
> Priority: Critical
> Fix For: Impala 5.0.0
>
>
> The ai_generate_text() and ai_generate_text_default() functions returns error
> message as a result (string) which could be misleading in some cases. Ideally
> we want to handle following scenarios by returning a SQL error/exception and
> failing the query:
> # HTTP error codes returned by the AI endpoint
> # Required configurations such as endpoint, model, credentials, etc are not
> set.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]