Skip to content
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

[BugFix] Fix the bug of RuntimeState use_after_free #28055

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix the bug of RuntimeState use_after_free
Signed-off-by: trueeyu <lxhhust350@qq.com>
  • Loading branch information
trueeyu committed Jul 27, 2023
commit 1cf1dac498546ae249c80fc1da5a1d62a89d6279
7 changes: 4 additions & 3 deletions be/src/service/internal_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,13 @@ void PInternalServiceImplBase<T>::_get_file_schema(google::protobuf::RpcControll
return;
}

RuntimeState state{};
RuntimeProfile profile{"dummy_profile", false};
ScannerCounter counter{};
std::unique_ptr<FileScanner> p_scanner;

auto tp = scan_range.ranges[0].format_type;
{
RuntimeState state{};
RuntimeProfile profile{"dummy_profile", false};
ScannerCounter counter{};
switch (tp) {
case TFileFormatType::FORMAT_PARQUET:
p_scanner = std::make_unique<ParquetScanner>(&state, &profile, scan_range, &counter, true);
Expand Down