Validate shared-memory index links and check segment creation (backport #6598) #6600
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 338 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.349
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6600"
general
weight: 0.35
MiguelCompany
Description
Even after #6503 there are issues with reading inconsistent shared memory segments.
This doesn't fix whatever is creating the bad segments (probably Windows sigint/sigterm handling dropping processes too quickly to end in a good state), but it makes it so that they aren't segfaults anymore.
Two causes, both in the vendored
boost::interprocess:1.
check_sanity()only validated the allocator, and its free-block walk followed offset pointers without checking they stay inside the segment.open_port_internalthen callsfind<PortNode>(), which walks the named index (iset_index) through more unvalidated offset pointers. Symbolized stack,3.6.x@2bad9bcca:Fix:
tree_sanity.hppadds a bounds-checked walk.2.
managed_open_or_create_implignored theboolreturned byconstruct_func.create_implreturnsfalsewhen constructing the segment manager throws (the exception is swallowed). The segment was still marked initialized and returned with a nullsegment_manager, which faulted inrbtree_best_fit::allocateon first use (this == nullptr, seen atSharedMemGlobal.hpp:1226andSharedMemManager.hpp:401). Both the create and open branches now throw.@Mergifyio backport 3.2.x 2.14.x 2.6.x
Contributor Checklist
versions.mdfile.Reviewer Checklist
<hr>This is an automatic backport of pull request #6598 done by Mergify.