This is an automated email from the ASF dual-hosted git repository. pengzheng pushed a commit to branch feature/483-conan-2-support in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/feature/483-conan-2-support by this push: new a76ad793 Fix asan error and re-enable pubsub_udpmc_tests. a76ad793 is described below commit a76ad793e7d5629204fe72a37923e3c7795351ae Author: PengZheng <howto...@gmail.com> AuthorDate: Thu Aug 24 18:01:43 2023 +0800 Fix asan error and re-enable pubsub_udpmc_tests. --- bundles/pubsub/integration/CMakeLists.txt | 2 ++ bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_receiver.c | 2 +- libs/dfi/src/json_serializer.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/pubsub/integration/CMakeLists.txt b/bundles/pubsub/integration/CMakeLists.txt index c57c1dfb..8408009b 100644 --- a/bundles/pubsub/integration/CMakeLists.txt +++ b/bundles/pubsub/integration/CMakeLists.txt @@ -160,6 +160,8 @@ if (PUBSUB_INTEGRATION) ) target_link_libraries(pubsub_udpmc_tests PRIVATE Celix::pubsub_api GTest::gtest GTest::gtest_main) target_include_directories(pubsub_udpmc_tests SYSTEM PRIVATE gtest) + add_test(NAME pubsub_udpmc_tests COMMAND pubsub_udpmc_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_udpmc_tests,CONTAINER_LOC>) + setup_target_for_coverage(pubsub_udpmc_tests SCAN_DIR ..) add_celix_container(pstm_deadlock_udpmc_test USE_CONFIG #ensures that a config.properties will be created with the launch bundles. diff --git a/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_receiver.c b/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_receiver.c index 5f820195..a468b3ee 100644 --- a/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_receiver.c +++ b/bundles/pubsub/pubsub_admin_udp_mc/src/pubsub_udpmc_topic_receiver.c @@ -485,7 +485,7 @@ static void psa_udpmc_processMsg(pubsub_udpmc_topic_receiver_t *receiver, pubsub if (validVersion) { struct iovec deSerializeBuffer; deSerializeBuffer.iov_base = msg->payload; - deSerializeBuffer.iov_len = 0; + deSerializeBuffer.iov_len = msg->payloadSize; celix_status_t status = msgSer->deserialize(msgSer->handle, &deSerializeBuffer, 0, &msgInst); if (status == CELIX_SUCCESS) { diff --git a/libs/dfi/src/json_serializer.c b/libs/dfi/src/json_serializer.c index 711eed05..c4668866 100644 --- a/libs/dfi/src/json_serializer.c +++ b/libs/dfi/src/json_serializer.c @@ -57,7 +57,7 @@ int jsonSerializer_deserialize(dyn_type *type, const char *input, size_t length, json_decref(root); } else { status = ERROR; - LOG_ERROR("Error parsing json input '%s'. Error is: %s\n", input, error.text); + LOG_ERROR("Error parsing json input '%.*s'. Error is: %s\n", (int)length, input, error.text); } if (status != OK) {