-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](multi table) do not use strlen to calculate the length of msg (#40367) #40500
Conversation
…pache#40367) Meet code dump when using single stream multi table load: ``` SUMMARY: AddressSanitizer: heap-buffer-overflow /root/doris/be/src/io/fs/multi_table_pipe.cpp:99:22 in doris::io::MultiTablePipe::dispatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*, unsigned long, doris::Status (doris::io::KafkaConsumerPipe::*)(char const*, unsigned long)) ``` 1. It is hard to guaranteed that msg is a C-style string ending in '\0' character. If not, it may cause the core dump to access memory out of bounds. 2. It is not need to calculate the length of msg twice. Therefore, deleting the logic that using strlen to calculate the length of msg.
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 49028 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 213226 ms
|
ClickBench: Total hot run time: 31.21 s
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
pick #40367
Meet code dump when using single stream multi table load:
Therefore, deleting the logic that using strlen to calculate the length of msg.