Skip to content

[Decode] Grow JPEG render tracking with slice data buffers - #2082

Open
XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:fix-jpeg-render-order
Open

XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:fix-jpeg-render-order

Conversation

@XinfengZhang

Copy link
Copy Markdown
Contributor

Grow JPEG render order and per-buffer slice parameter tracking alongside the slice data array. This prevents out-of-bounds tracking accesses when more data buffers are created than the initial capacity.

Allocate and copy all three arrays before replacing them, preserve current state on allocation failure, and check capacity arithmetic. Apply the same fix to the legacy and softlet JPEG decode paths.

Validation: ASan/UBSan harnesses compiled from the actual AllocBsBuffer and SetBufferRendered functions passed 11 cases per path, covering capacity thresholds, reverse and duplicate submission, and failure/retry at each tracking allocation. No GPU or full driver build was run.

@XinfengZhang
XinfengZhang marked this pull request as ready for review November 26, 2026 07:42
Grow all per-buffer tracking arrays when JPEG slice data capacity increases.
Preserve current entries and publish the new capacity only after all allocations
succeed, keeping the previous arrays usable on allocation failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant