BiteTheDDDDt opened a new issue, #13006: URL: https://github.com/apache/doris/issues/13006
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version master ### What's Wrong? ```sql select substr('a',-2,1); ``` ```cpp ==1832636==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c000632a38 at pc 0x55f3875bd05e bp 0x7f1e267a8c50 sp 0x7f1e267a8c40 READ of size 8 at 0x60c000632a38 thread T136 (FragmentMgrThre) #0 0x55f3875bd05d in doris::vectorized::SubstringUtil::vector(doris::vectorized::PODArray<unsigned char, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, doris::vectorized::PODArray<unsigned int, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, doris::vectorized::PODArray<int, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, doris::vectorized::PODArray<int, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, doris::vectorized::PODArray<unsigned char, 4096ul, Allocator<false, false>, 15ul, 16ul>&, doris::vectorized::PODArray<unsigned char, 4096ul, Allocator<false, false>, 15ul, 16ul>&, doris::vectorized::PODArray<unsigned int, 4096ul, Allocator<false, false>, 15ul, 16ul>&) /doris_master/be/src/vec/functions/function_string.h:198 #1 0x55f3875bc4e7 in doris::vectorized::SubstringUtil::substring_execute(doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) doris_master/be/src/vec/functions/function_string.h:147 #2 0x55f3875bd800 in doris::vectorized::Substr3Impl::execute_impl(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) doris_master/be/src/vec/functions/function_string.h:252 #3 0x55f387655a3b in doris::vectorized::FunctionSubstring<doris::vectorized::Substr3Impl>::execute_impl(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) doris_master/be/src/vec/functions/function_string.h:239 #4 0x55f3860b988e in doris::vectorized::DefaultExecutable::execute_impl(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) doris_master/be/src/vec/functions/function.h:465 #5 0x55f3871d89a2 in ``` ### What You Expected? fix ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: commits-unsubscr...@doris.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org