mirror of
https://github.com/XRPLF/rippled.git
synced 2026-02-21 22:32:35 +00:00
Compare commits
31 Commits
pratik/Fix
...
ripple/was
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c3c0280b1 | ||
|
|
bd16f7989d | ||
|
|
2ec4a1114e | ||
|
|
b2627039f6 | ||
|
|
e85e7b1b1a | ||
|
|
72fffb6e51 | ||
|
|
f7ee580f01 | ||
|
|
122d405750 | ||
|
|
d7ed6d6512 | ||
|
|
8bc6f9cd70 | ||
|
|
ed5139d4e3 | ||
|
|
7a9d245950 | ||
|
|
d83ec96848 | ||
|
|
419d53ec4c | ||
|
|
d4d70d5675 | ||
|
|
bbc28b3b1c | ||
|
|
5aab274b7a | ||
|
|
2c30e41191 | ||
|
|
8ea5106b0b | ||
|
|
1977df9c2e | ||
|
|
6c95548df5 | ||
|
|
90e0bbd0fc | ||
|
|
b57df290de | ||
|
|
8a403f1241 | ||
|
|
6d2640871d | ||
|
|
500bb68831 | ||
|
|
16087c9680 | ||
|
|
25c3060fef | ||
|
|
ce9f0b38a4 | ||
|
|
35f7cbf772 | ||
|
|
0db564d261 |
@@ -103,6 +103,7 @@ find_package(OpenSSL REQUIRED)
|
||||
find_package(secp256k1 REQUIRED)
|
||||
find_package(SOCI REQUIRED)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
find_package(wasmi REQUIRED)
|
||||
find_package(xxHash REQUIRED)
|
||||
|
||||
target_link_libraries(
|
||||
|
||||
@@ -45,6 +45,7 @@ target_link_libraries(
|
||||
Xrpl::opts
|
||||
Xrpl::syslibs
|
||||
secp256k1::secp256k1
|
||||
wasmi::wasmi
|
||||
xrpl.libpb
|
||||
xxHash::xxhash
|
||||
$<$<BOOL:${voidstar}>:antithesis-sdk-cpp>)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"requires": [
|
||||
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1765850150.075",
|
||||
"xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1765850149.987",
|
||||
"wasmi/1.0.6#407c9db14601a8af1c7dd3b388f3e4cd%1768164779.349",
|
||||
"sqlite3/3.49.1#8631739a4c9b93bd3d6b753bac548a63%1765850149.926",
|
||||
"soci/4.0.3#a9f8d773cd33e356b5879a4b0564f287%1765850149.46",
|
||||
"snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1765850147.878",
|
||||
|
||||
@@ -35,6 +35,7 @@ class Xrpl(ConanFile):
|
||||
"openssl/3.5.5",
|
||||
"secp256k1/0.7.1",
|
||||
"soci/4.0.3",
|
||||
"wasmi/1.0.6",
|
||||
"zlib/1.3.1",
|
||||
]
|
||||
|
||||
@@ -215,6 +216,7 @@ class Xrpl(ConanFile):
|
||||
"soci::soci",
|
||||
"secp256k1::secp256k1",
|
||||
"sqlite3::sqlite",
|
||||
"wasmi::wasmi",
|
||||
"xxhash::xxhash",
|
||||
"zlib::zlib",
|
||||
]
|
||||
|
||||
@@ -287,6 +287,7 @@ words:
|
||||
- venv
|
||||
- vfalco
|
||||
- vinnie
|
||||
- wasmi
|
||||
- wextra
|
||||
- wptr
|
||||
- writeme
|
||||
|
||||
@@ -229,7 +229,7 @@ missing_field_error(std::string const& name)
|
||||
}
|
||||
|
||||
inline Json::Value
|
||||
missing_field_error(Json::StaticString const& name)
|
||||
missing_field_error(Json::StaticString name)
|
||||
{
|
||||
return missing_field_error(std::string(name));
|
||||
}
|
||||
@@ -247,7 +247,7 @@ object_field_error(std::string const& name)
|
||||
}
|
||||
|
||||
inline Json::Value
|
||||
object_field_error(Json::StaticString const& name)
|
||||
object_field_error(Json::StaticString name)
|
||||
{
|
||||
return object_field_error(std::string(name));
|
||||
}
|
||||
@@ -259,7 +259,7 @@ invalid_field_message(std::string const& name)
|
||||
}
|
||||
|
||||
inline std::string
|
||||
invalid_field_message(Json::StaticString const& name)
|
||||
invalid_field_message(Json::StaticString name)
|
||||
{
|
||||
return invalid_field_message(std::string(name));
|
||||
}
|
||||
@@ -271,7 +271,7 @@ invalid_field_error(std::string const& name)
|
||||
}
|
||||
|
||||
inline Json::Value
|
||||
invalid_field_error(Json::StaticString const& name)
|
||||
invalid_field_error(Json::StaticString name)
|
||||
{
|
||||
return invalid_field_error(std::string(name));
|
||||
}
|
||||
@@ -283,7 +283,7 @@ expected_field_message(std::string const& name, std::string const& type)
|
||||
}
|
||||
|
||||
inline std::string
|
||||
expected_field_message(Json::StaticString const& name, std::string const& type)
|
||||
expected_field_message(Json::StaticString name, std::string const& type)
|
||||
{
|
||||
return expected_field_message(std::string(name), type);
|
||||
}
|
||||
@@ -295,7 +295,7 @@ expected_field_error(std::string const& name, std::string const& type)
|
||||
}
|
||||
|
||||
inline Json::Value
|
||||
expected_field_error(Json::StaticString const& name, std::string const& type)
|
||||
expected_field_error(Json::StaticString name, std::string const& type)
|
||||
{
|
||||
return expected_field_error(std::string(name), type);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <numeric>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
@@ -108,7 +107,7 @@ public:
|
||||
int& exponent,
|
||||
internalrep const& minMantissa,
|
||||
internalrep const& maxMantissa,
|
||||
std::string_view location);
|
||||
std::string location);
|
||||
|
||||
// Modify the result to the correctly rounded value
|
||||
template <UnsignedMantissa T>
|
||||
@@ -117,7 +116,7 @@ public:
|
||||
|
||||
// Modify the result to the correctly rounded value
|
||||
void
|
||||
doRound(rep& drops, std::string_view location);
|
||||
doRound(rep& drops, std::string location);
|
||||
|
||||
private:
|
||||
void
|
||||
@@ -239,7 +238,7 @@ Number::Guard::doRoundUp(
|
||||
int& exponent,
|
||||
internalrep const& minMantissa,
|
||||
internalrep const& maxMantissa,
|
||||
std::string_view location)
|
||||
std::string location)
|
||||
{
|
||||
auto r = round();
|
||||
if (r == 1 || (r == 0 && (mantissa & 1) == 1))
|
||||
@@ -255,7 +254,7 @@ Number::Guard::doRoundUp(
|
||||
}
|
||||
bringIntoRange(negative, mantissa, exponent, minMantissa);
|
||||
if (exponent > maxExponent)
|
||||
Throw<std::overflow_error>(std::string(location));
|
||||
throw std::overflow_error(location);
|
||||
}
|
||||
|
||||
template <UnsignedMantissa T>
|
||||
@@ -277,7 +276,7 @@ Number::Guard::doRoundDown(bool& negative, T& mantissa, int& exponent, internalr
|
||||
|
||||
// Modify the result to the correctly rounded value
|
||||
void
|
||||
Number::Guard::doRound(rep& drops, std::string_view location)
|
||||
Number::Guard::doRound(rep& drops, std::string location)
|
||||
{
|
||||
auto r = round();
|
||||
if (r == 1 || (r == 0 && (drops & 1) == 1))
|
||||
@@ -291,7 +290,7 @@ Number::Guard::doRound(rep& drops, std::string_view location)
|
||||
// or "(maxRep + 1) / 10", neither of which will round up when
|
||||
// converting to rep, though the latter might overflow _before_
|
||||
// rounding.
|
||||
throw std::overflow_error(std::string(location)); // LCOV_EXCL_LINE
|
||||
throw std::overflow_error(location); // LCOV_EXCL_LINE
|
||||
}
|
||||
++drops;
|
||||
}
|
||||
|
||||
@@ -984,12 +984,7 @@ amountFromJson(SField const& name, Json::Value const& v)
|
||||
else if (v.isString())
|
||||
{
|
||||
std::string val = v.asString();
|
||||
// Pre-allocate to avoid reallocation during split. This function is often
|
||||
// called deep in the RPC stack (via JSON parsing) where stack space is
|
||||
// limited. ASAN detected stack-buffer-overflow here at ~95% coroutine
|
||||
// stack usage (1001376/1048576 bytes). Coroutine stack increased to 2MB.
|
||||
std::vector<std::string> elements;
|
||||
elements.reserve(3);
|
||||
boost::split(elements, val, boost::is_any_of("\t\n\r ,/"));
|
||||
|
||||
if (elements.size() > 3)
|
||||
|
||||
Reference in New Issue
Block a user