Marton Szasz created MINIFICPP-2245:
---------------------------------------

             Summary: Fix overflow during AWS SDK initialization
                 Key: MINIFICPP-2245
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-2245
             Project: Apache NiFi MiNiFi C++
          Issue Type: Bug
            Reporter: Marton Szasz


{{=================================================================}}
{{==988449==ERROR: AddressSanitizer: global-buffer-overflow on address 
0x7f80e222bca8 at pc 0x7f80e1ca4532 bp 0x7ffc3473ab50 sp 0x7ffc3473ab40}}
{{READ of size 4 at 0x7f80e222bca8 thread T0}}
{{    #0 0x7f80e1ca4531 in hashlittle2 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-common/include/aws/common/private/lookup3.inl:551}}
{{    #1 0x7f80e1cabf12 in aws_hash_byte_cursor_ptr 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-common/source/hash_table.c:975}}
{{    #2 0x7f80e1ca6882 in s_hash_for 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-common/source/hash_table.c:48}}
{{    #3 0x7f80e1ca8b9d in aws_hash_table_create 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-common/source/hash_table.c:517}}
{{    #4 0x7f80e1ca90c4 in aws_hash_table_put 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-common/source/hash_table.c:583}}
{{    #5 0x7f80e1baf9d2 in s_init_str_to_enum_hash_table 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-http/source/http.c:213}}
{{    #6 0x7f80e1bb039c in s_headers_init 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-http/source/http.c:333}}
{{    #7 0x7f80e1bb09a3 in aws_http_library_init 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-http/source/http.c:509}}
{{    #8 0x7f80e1b31472 in aws_mqtt_library_init 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/crt/aws-c-mqtt/source/mqtt.c:188}}
{{    #9 0x7f80e1a9b70b in s_initApi 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/source/Api.cpp:47}}
{{    #10 0x7f80e1a9b70b in Aws::Crt::ApiHandle::ApiHandle(aws_allocator*) 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/crt/aws-crt-cpp/source/Api.cpp:61}}
{{    #11 0x7f80e16ea38d in Aws::Crt::ApiHandle* Aws::New<Aws::Crt::ApiHandle, 
aws_allocator*>(char const*, aws_allocator*&&) 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/aws-cpp-sdk-core/include/aws/core/utils/memory/AWSMem}}
{{ory.h:67}}
{{    #12 0x7f80e16ea38d in Aws::InitializeCrt() 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/aws-cpp-sdk-core/source/Globals.cpp:49}}
{{    #13 0x7f80e16e4388 in Aws::InitAPI(Aws::SDKOptions const&) 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/thirdparty/aws-sdk-cpp-src/aws-cpp-sdk-core/source/Aws.cpp:31}}
{{    #14 0x7f80e0ed71cd in 
org::apache::nifi::minifi::aws::utils::AWSInitializer::AWSInitializer() 
/home/szaszm/nifi-minifi-cpp-3/extensions/aws/utils/AWSInitializer.cpp:49}}
{{    #15 0x7f80e0ed7c51 in 
org::apache::nifi::minifi::aws::utils::AWSInitializer::get() 
/home/szaszm/nifi-minifi-cpp-3/extensions/aws/utils/AWSInitializer.cpp:39}}
{{    #16 0x5593926c4de7 in 
org::apache::nifi::minifi::aws::s3::S3RequestSender::S3RequestSender() 
/home/szaszm/nifi-minifi-cpp-3/extensions/aws/s3/S3RequestSender.h:65}}
{{    #17 0x5593926c4de7 in MockS3RequestSender::MockS3RequestSender() 
/home/szaszm/nifi-minifi-cpp-3/extensions/aws/tests/MockS3RequestSender.h:63}}
{{    #18 0x5593926ecb66 in 
S3TestsFixture<org::apache::nifi::minifi::aws::processors::ListS3>::S3TestsFixture()
 /home/szaszm/nifi-minifi-cpp-3/extensions/aws/tests/S3TestsFixture.h:61}}
{{    #19 0x5593926ee1ea in 
FlowProducerS3TestsFixture<org::apache::nifi::minifi::aws::processors::ListS3>::FlowProducerS3TestsFixture()
 /home/szaszm/nifi-minifi-cpp-3/extensions/aws/tests/S3TestsFixture.h:195}}
{{    #20 0x5593926a7e39 in CATCH2_INTERNAL_TEST_0 
/home/szaszm/nifi-minifi-cpp-3/extensions/aws/tests/ListS3Tests.cpp:24}}
{{    #21 0x5593926a7e39 in invoke 
/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/_deps/catch2-src/src/catch2/../catch2/internal/catch_test_registry.hpp:38}}
{{    #22 0x559392997883 in Catch::TestCaseHandle::invoke() const 
src/catch2/../catch2/catch_test_case_info.hpp:115}}
{{    #23 0x559392997883 in Catch::RunContext::invokeActiveTestCase() 
src/catch2/internal/catch_run_context.cpp:552}}
{{    #24 0x55939299f092 in 
Catch::RunContext::runCurrentTest(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >&, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
>&) src/catch2/internal/catch_}}
{{run_context.cpp:515}}
{{    #25 0x55939299ff66 in Catch::RunContext::runTest(Catch::TestCaseHandle 
const&) src/catch2/internal/catch_run_context.cpp:239}}
{{    #26 0x5593928d9f61 in execute src/catch2/catch_session.cpp:111}}
{{    #27 0x5593928d9f61 in Catch::Session::runInternal() 
src/catch2/catch_session.cpp:333}}
{{    #28 0x5593928dc3cb in Catch::Session::run() 
src/catch2/catch_session.cpp:264}}
{{    #29 0x55939267dc07 in int Catch::Session::run<char>(int, char const* 
const*) src/catch2/../catch2/catch_session.hpp:41}}
{{    #30 0x55939267dc07 in int Catch::Session::run<char>(int, char const* 
const*) src/catch2/../catch2/catch_session.hpp:36}}
{{    #31 0x55939267dc07 in main src/catch2/internal/catch_main.cpp:36}}
{{    #32 0x7f80dd7adccf  (/usr/lib/libc.so.6+0x27ccf) (BuildId: 
316d0d3666387f0e8fb98773f51aa1801027c5ab)}}
{{    #33 0x7f80dd7add89 in __libc_start_main (/usr/lib/libc.so.6+0x27d89) 
(BuildId: 316d0d3666387f0e8fb98773f51aa1801027c5ab)}}
{{{}    #34 0x55939267e5f4 in _start 
(/home/szaszm/nifi-minifi-cpp-3/build-gcc-make/bin/ListS3Tests+0xf35f4) 
(BuildId: 957287c155574addc1c9944342cd1b5ab6d51c9b){}}}{{{}{}}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to