Skip to content

Vendors: Pin MafiaNet 0.23.0 - #329

Merged
Segfaultd merged 1 commit into
developfrom
vendors/mafianet-0.23.0
Oct 15, 2026
Merged

Segfaultd merged 1 commit into
developfrom
vendors/mafianet-0.23.0

Conversation

@Segfaultd

@Segfaultd Segfaultd commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Fixes #315.

What changes

  • MAFIANET_PIN_VERSION goes to 0.23.0, with the five archive hashes taken from the release assets.
  • MafiaNet 0.23.0 includes fix: Survive a shutdown from inside receive dispatch MafiaNet#73. A Shutdown() called from inside receive dispatch no longer frees the packet being dispatched or the FileListTransfer receiver whose callback is running. That was the crash when a client refused a join from OnAssetsDownloaded.
  • 0.23.0 renames every header to snake_case (BitStream.h → bit_stream.h, RakVoice.h → voice.h). The 38 Framework files that include MafiaNet are rewritten from MafiaNet's own git diff -M rename list; only #include lines change.
  • Wire-compatible: RAKNET_PROTOCOL_VERSION is still 7. Nothing Framework uses moved to MafiaNetExtras.

Projects

Every project under code/projects that includes MafiaNet needs the same include rewrite before it builds against this pin. The renames add underscores, not just case, so they break on Windows too. Those are separate repos and land separately.

Testing

Framework, FrameworkClient, FrameworkServer and FrameworkTests build on Windows x64. The 0.23.0 archive downloads and its hash verifies. FrameworkTests: 662/662.

Summary by CodeRabbit

  • Improvements
    • Updated networking and voice components to align with the current networking interface. Existing network communication remains wire-compatible, and this update does not change user-facing behavior or add new features.
    • Related checks and test coverage remain aligned with the updated interface; test expectations and application behavior are unchanged.

0.23.0 makes a Shutdown() from inside receive dispatch safe: it no
longer frees the packet being dispatched or the FileListTransfer
receiver whose callback is running, which is the crash a client hit
when it refused a join from its asset download callback (#315).

0.23.0 also renames every header to snake_case, so each MafiaNet
include moves to its new name. The wire format is unchanged
(RAKNET_PROTOCOL_VERSION 7).
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 69b3a1e7-49b8-44ff-baa8-449f09f65a95
📥 Commits

Reviewing files that changed from the base of the PR and between 762a6dc and 98e190a.

📒 Files selected for processing: 39
  • cmake/MafiaNetPin.cmake
  • code/framework/src/integrations/client/instance.h
  • code/framework/src/integrations/shared/rpc/emit_script_event.h
  • code/framework/src/networking/connection.h
  • code/framework/src/networking/network_client.cpp
  • code/framework/src/networking/network_client.h
  • code/framework/src/networking/network_peer.h
  • code/framework/src/networking/network_server.cpp
  • code/framework/src/networking/network_server.h
  • code/framework/src/networking/replication/delegation.cpp
  • code/framework/src/networking/replication/delegation.h
  • code/framework/src/networking/replication/interest_grid.cpp
  • code/framework/src/networking/replication/interest_grid.h
  • code/framework/src/networking/replication/network_entity.cpp
  • code/framework/src/networking/replication/network_entity.h
  • code/framework/src/networking/replication/replication_connection.cpp
  • code/framework/src/networking/replication/replication_connection.h
  • code/framework/src/networking/replication/replication_manager.h
  • code/framework/src/networking/replication/state_bag.h
  • code/framework/src/networking/replication/transform_batch.h
  • code/framework/src/networking/rpc/client_identity.h
  • code/framework/src/networking/rpc/rpc.h
  • code/framework/src/networking/rpc/state_bag_sync.h
  • code/framework/src/scripting/builtins/chat.cpp
  • code/framework/src/utils/snapshot_buffer.h
  • code/framework/src/voice/client/voice_client.h
  • code/framework/src/voice/server/voice_router.h
  • code/framework/src/voice/server/voice_server.cpp
  • code/framework/src/voice/server/voice_server.h
  • code/tests/modules/asset_transfer_ut.h
  • code/tests/modules/delegation_ut.h
  • code/tests/modules/nametag_ut.h
  • code/tests/modules/network_packets_ut.h
  • code/tests/modules/replication_authority_ut.h
  • code/tests/modules/replication_rate_ut.h
  • code/tests/modules/rpc_identifier_ut.h
  • code/tests/modules/state_bag_ut.h
  • code/tests/modules/streamed_assets_ut.h
  • code/tests/modules/voice_positions_ut.h

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The MafiaNet pin advances from 0.22.1 to 0.23.0, and its archive hashes are updated. Framework and test includes now use the dependency’s lowercase header paths. No runtime logic or test expectations change.

Changes

MafiaNet Update

Layer / File(s) Summary
Update dependency pin
cmake/MafiaNetPin.cmake
The pinned MafiaNet version and archive hashes are updated. The version comment now describes receive-dispatch shutdown behavior and snake_case header names.
Migrate MafiaNet includes
code/framework/src/integrations/*, code/framework/src/networking/*, code/framework/src/scripting/*, code/framework/src/utils/*, code/framework/src/voice/*, code/tests/modules/*
Framework and test includes are updated to MafiaNet’s lowercase header names. Test logic and expectations remain unchanged.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: zpl-zak

Merge Risk: ⚪ Minimal · up to 98e19

No actionable merge-blocking risk is established from the reviewed changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 38 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the primary change: pinning the MafiaNet vendor dependency to version 0.23.0.
Linked Issues check Passed Issue #315 requires removal of the receive-dispatch shutdown use-after-free. The PR pins MafiaNet 0.23.0, whose documented release behavior keeps the active packet and FileListTransfer receiver valid …
Out of Scope Changes check Passed The changes are limited to the MafiaNet 0.23.0 pin, its archive hashes, and include-path rewrites required by the pinned release. The include changes affect Framework and FrameworkTests files that con…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 38 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks each header’s name,
Then hops through paths that changed their case.
New hashes sit beside the pin,
While tests keep all their old routines.
The rabbit rests beside the build.

Comment @coderabbitai help to get the list of available commands.

@Segfaultd
Segfaultd merged commit 4cf5bb9 into develop Oct 15, 2026
6 checks passed
@Segfaultd
Segfaultd deleted the vendors/mafianet-0.23.0 branch October 15, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Client: use-after-free crash when a join is refused after the asset download completes

2 participants