Fix `label2rgb` out-of-bounds GPU read when `bg_color=None` #1249
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.31) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 99 lines diff across 1 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
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.276
Real PR Conversation Timeline
1 comments
"Review active on #1249"
general
weight: 0.35
gigony
This is a cherry-pick of #1234 so that it is on top of the 26.12 release branch instead of
mainWith
bg_color=None,_label2rgb_overlayreplacedbg_colorby a zero-size array and only afterwards evaluatedbg_color is Noneto decide whether the background should be left unpainted. That check was therefore always false, and the kernels readbg_color[0..2]from the empty array for every background pixel, which ends incudaErrorIllegalAddress.Record the "no background color" case before replacing
bg_color, and use a 3-element zero placeholder so that the kernels never index an empty array. As in scikit-image, the background is then left as zeros when no image is given and shows the image otherwise.(cherry picked from commit 671e9378981b6a9c24425357d5b59909a1bd052d)