mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-22 04:32:25 +00:00
fix: Add missing ByteUtilities.h include and use coroStackSize constant
- Include ByteUtilities.h in Coro.ipp so megabytes() is declared - Use coroStackSize constant in coroutine constructor instead of hardcoded 1536*1024, enabling sanitizer-aware stack sizing - Initialize local variable in PropertyStream destructor to satisfy clang-tidy cppcoreguidelines-init-variables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <xrpl/basics/ByteUtilities.h>
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace xrpl {
|
||||
@@ -25,9 +27,7 @@ JobQueue::Coro::Coro(Coro_create_t, JobQueue& jq, JobType type, std::string cons
|
||||
, name_(name)
|
||||
, running_(false)
|
||||
, coro_(
|
||||
// Stack size of 1MB wasn't sufficient for deep calls. ASAN tests flagged the issue. Hence
|
||||
// increasing the size to 1.5MB.
|
||||
boost::context::protected_fixedsize_stack(1536 * 1024),
|
||||
boost::context::protected_fixedsize_stack(coroStackSize),
|
||||
[this, fn = std::forward<F>(f)](
|
||||
boost::coroutines2::asymmetric_coroutine<void>::push_type& do_yield) {
|
||||
yield_ = &do_yield;
|
||||
|
||||
@@ -161,7 +161,7 @@ PropertyStream::Source::~Source()
|
||||
// Read parent_ under lock, then release before calling remove()
|
||||
// to maintain consistent lock ordering (parent before child),
|
||||
// matching the order used in find_one_deep().
|
||||
Source* parent;
|
||||
Source* parent = nullptr;
|
||||
{
|
||||
std::lock_guard _(lock_);
|
||||
parent = parent_;
|
||||
|
||||
Reference in New Issue
Block a user