[fix](multi table) do not use strlen to calculate the length of msg (#40367)#40500
Merged
dataroaring merged 1 commit intoapache:branch-2.0from Sep 7, 2024
sollhui:2.0_multi_table
Merged
[fix](multi table) do not use strlen to calculate the length of msg (#40367)#40500dataroaring merged 1 commit intoapache:branch-2.0from sollhui:2.0_multi_table
dataroaring merged 1 commit intoapache:branch-2.0from
sollhui:2.0_multi_table
Conversation
…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. |
Contributor
Author
|
run buildall |
Contributor
|
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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.