From d835e974905474d6b7d90be9f846c4cb2abe180b Mon Sep 17 00:00:00 2001 From: Bronek Kozicki Date: Thu, 31 Jul 2025 18:08:34 +0100 Subject: [PATCH 1/3] Fix crash in Slot::deletePeer (#5635) Fix crash due to recurrent call to `Slot::deletePeer` (via `OverlayImpl::unsquelch`) when a peer is disconnected at just the wrong moment. --- src/xrpld/overlay/Slot.h | 8 +++++++- src/xrpld/overlay/detail/OverlayImpl.cpp | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/xrpld/overlay/Slot.h b/src/xrpld/overlay/Slot.h index 0956eb06f7..ea9fc3285b 100644 --- a/src/xrpld/overlay/Slot.h +++ b/src/xrpld/overlay/Slot.h @@ -446,6 +446,8 @@ Slot::deletePeer(PublicKey const& validator, id_t id, bool erase) auto it = peers_.find(id); if (it != peers_.end()) { + std::vector toUnsquelch; + JLOG(journal_.trace()) << "deletePeer: " << Slice(validator) << " " << id << " selected " << (it->second.state == PeerState::Selected) << " considered " @@ -457,7 +459,7 @@ Slot::deletePeer(PublicKey const& validator, id_t id, bool erase) for (auto& [k, v] : peers_) { if (v.state == PeerState::Squelched) - handler_.unsquelch(validator, k); + toUnsquelch.push_back(k); v.state = PeerState::Counting; v.count = 0; v.expire = now; @@ -479,6 +481,10 @@ Slot::deletePeer(PublicKey const& validator, id_t id, bool erase) if (erase) peers_.erase(it); + + // Must be after peers_.erase(it) + for (auto const& k : toUnsquelch) + handler_.unsquelch(validator, k); } } diff --git a/src/xrpld/overlay/detail/OverlayImpl.cpp b/src/xrpld/overlay/detail/OverlayImpl.cpp index 3cc5b2a024..53b4cad646 100644 --- a/src/xrpld/overlay/detail/OverlayImpl.cpp +++ b/src/xrpld/overlay/detail/OverlayImpl.cpp @@ -1423,7 +1423,12 @@ OverlayImpl::updateSlotAndSquelch( if (!strand_.running_in_this_thread()) return post( strand_, - [this, key, validator, peers = std::move(peers), type]() mutable { + // Must capture copies of reference parameters (i.e. key, validator) + [this, + key = key, + validator = validator, + peers = std::move(peers), + type]() mutable { updateSlotAndSquelch(key, validator, std::move(peers), type); }); @@ -1444,9 +1449,12 @@ OverlayImpl::updateSlotAndSquelch( return; if (!strand_.running_in_this_thread()) - return post(strand_, [this, key, validator, peer, type]() { - updateSlotAndSquelch(key, validator, peer, type); - }); + return post( + strand_, + // Must capture copies of reference parameters (i.e. key, validator) + [this, key = key, validator = validator, peer, type]() { + updateSlotAndSquelch(key, validator, peer, type); + }); slots_.updateSlotAndSquelch(key, validator, peer, type, [&]() { reportInboundTraffic(TrafficCount::squelch_ignored, 0); From 31c99caa65bfe8beaf6137b69c11a1fab40cae61 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 31 Jul 2025 19:01:43 +0100 Subject: [PATCH 2/3] Revert "ci: Build all conan dependencies from source for now (#5623)" (#5639) This reverts commit 9b45b6888b9bfc4ca81d0fb71e0b6f2f3a120bae. --- .github/actions/dependencies/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml index c5c6a59ab9..7ece9710a8 100644 --- a/.github/actions/dependencies/action.yml +++ b/.github/actions/dependencies/action.yml @@ -43,7 +43,7 @@ runs: cd ${build_dir} conan install \ --output-folder . \ - --build '*' \ + --build missing \ --options:host "&:tests=True" \ --options:host "&:xrpld=True" \ --settings:all build_type=${{ inputs.configuration }} \ From 6419f9a253f0bcae72b863cf8a8de72415fc5b9c Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Mon, 4 Aug 2025 16:54:54 +0200 Subject: [PATCH 3/3] docs: Set up developer environment with specific XCode version (#5645) --- docs/build/environment.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/build/environment.md b/docs/build/environment.md index 760be144d8..40a80d4b25 100644 --- a/docs/build/environment.md +++ b/docs/build/environment.md @@ -53,6 +53,34 @@ minimum required (see [BUILD.md][]). clang --version ``` +### Install Xcode Specific Version (Optional) + +If you develop other applications using XCode you might be consistently updating to the newest version of Apple Clang. +This will likely cause issues building rippled. You may want to install a specific version of Xcode: + +1. **Download Xcode** + + - Visit [Apple Developer Downloads](https://developer.apple.com/download/more/) + - Sign in with your Apple Developer account + - Search for an Xcode version that includes **Apple Clang (Expected Version)** + - Download the `.xip` file + +2. **Install and Configure Xcode** + + ```bash + # Extract the .xip file and rename for version management + # Example: Xcode_16.2.app + + # Move to Applications directory + sudo mv Xcode_16.2.app /Applications/ + + # Set as default toolchain (persistent) + sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer + + # Set as environment variable (temporary) + export DEVELOPER_DIR=/Applications/Xcode_16.2.app/Contents/Developer + ``` + The command line developer tools should include Git too: ```