From 05ef3b1ad8a5db75bd240e1b31f2dcb5e5115a86 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Fri, 23 Jan 2026 18:28:09 +0000 Subject: [PATCH] more fixes Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> --- cmake/deps/Boost.cmake | 26 +++++++++++++------------- include/xrpl/basics/base_uint.h | 1 + include/xrpl/protocol/ErrorCodes.h | 6 +++--- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/cmake/deps/Boost.cmake b/cmake/deps/Boost.cmake index b73698efd8..0f65079f38 100644 --- a/cmake/deps/Boost.cmake +++ b/cmake/deps/Boost.cmake @@ -35,16 +35,16 @@ target_link_libraries(xrpl_boost if(Boost_COMPILER) target_link_libraries(xrpl_boost INTERFACE Boost::disable_autolinking) endif() -if(SANITIZERS_ENABLED AND is_clang) - # TODO: gcc does not support -fsanitize-blacklist...can we do something else - # for gcc ? - if(NOT Boost_INCLUDE_DIRS AND TARGET Boost::headers) - get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES) - endif() - message(STATUS "Adding [${Boost_INCLUDE_DIRS}] to sanitizer blacklist") - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt "src:${Boost_INCLUDE_DIRS}/*") - target_compile_options(opts - INTERFACE - # ignore boost headers for sanitizing - -fsanitize-blacklist=${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt) -endif() +# if(SANITIZERS_ENABLED AND is_clang) +# # TODO: gcc does not support -fsanitize-blacklist...can we do something else +# # for gcc ? +# if(NOT Boost_INCLUDE_DIRS AND TARGET Boost::headers) +# get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES) +# endif() +# message(STATUS "Adding [${Boost_INCLUDE_DIRS}] to sanitizer blacklist") +# file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt "src:${Boost_INCLUDE_DIRS}/*") +# target_compile_options(opts +# INTERFACE +# # ignore boost headers for sanitizing +# -fsanitize-blacklist=${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt) +# endif() diff --git a/include/xrpl/basics/base_uint.h b/include/xrpl/basics/base_uint.h index a1ed223674..59af80cb2f 100644 --- a/include/xrpl/basics/base_uint.h +++ b/include/xrpl/basics/base_uint.h @@ -366,6 +366,7 @@ public: base_uint& operator&=(base_uint const& b) { + XRPL_ASSERT(WIDTH == b.WIDTH, "input size mismatch"); for (int i = 0; i < WIDTH; i++) data_[i] &= b.data_[i]; diff --git a/include/xrpl/protocol/ErrorCodes.h b/include/xrpl/protocol/ErrorCodes.h index 3a2645347a..874d2d9b69 100644 --- a/include/xrpl/protocol/ErrorCodes.h +++ b/include/xrpl/protocol/ErrorCodes.h @@ -253,7 +253,7 @@ missing_field_error(Json::StaticString name) inline std::string object_field_message(std::string const& name) { - return "Invalid field '" + name + "', not object."; + return {"Invalid field '" + name + "', not object."}; } inline Json::Value @@ -271,7 +271,7 @@ object_field_error(Json::StaticString name) inline std::string invalid_field_message(std::string const& name) { - return "Invalid field '" + name + "'."; + return {"Invalid field '" + name + "'."}; } inline std::string @@ -295,7 +295,7 @@ invalid_field_error(Json::StaticString name) inline std::string expected_field_message(std::string const& name, std::string const& type) { - return "Invalid field '" + name + "', not " + type + "."; + return {"Invalid field '" + name + "', not " + type + "."}; } inline std::string