Skip to content

[0.4.x] Plugins (JESS): Fix 8-bit blur without MMX - #433

Open
fmolara wants to merge 1 commit into
Libvisual:0.4.xfrom
fmolara:plugins-fix-jess-8bit-blur
Open

fmolara wants to merge 1 commit into
Libvisual:0.4.xfrom
fmolara:plugins-fix-jess-8bit-blur

Conversation

@fmolara

@fmolara fmolara commented Nov 1, 2026 •

Copy link
Copy Markdown

The scalar 8-bit blur loop uses an uninitialized upper bound: render_blur()
assigns bmax only inside the MMX branch, although the non-MMX branch also
uses it to stop iterating over the pixel buffer. This can run past the
buffer and crash while rendering an 8-bit surface.

Move the existing assignment before the MMX/non-MMX branch so both paths
use the same initialized bound. The loop and bound calculation are
otherwise unchanged.

Validation with a headless libvisual client rendering 16 frames into a
320x240 8-bit surface, fed with synthetic stereo audio:

  • Before the fix: SIGSEGV in render_blur() on native amd64 and sh4 under
    QEMU. GDB identifies the scalar loop at renderer.c:421.
  • After the fix: all 16 frames complete with rendered output on both
    native amd64 and sh4/QEMU.
  • The unchanged sh4 plugin also completes with a 32-bit surface, isolating
    the failing case to the 8-bit path.

This targets 0.4.x and changes only the JESS renderer.

CI status: all four Linux/macOS build-and-test jobs and the help-output
check pass. The translation-sync job stops during the core configure
step with "Invalid configuration '\'", before catalog comparison. Its
translations.yml has a trailing backslash on the final --prefix line;
that workflow is unchanged between the fork base and current 0.4.x.
No workflow or catalog files are changed by this PR.

The non-MMX 8-bit loop uses bmax without initializing it, which can
iterate beyond the pixel buffer and crash. Move the existing assignment
before the MMX/non-MMX branch so both paths use the same initialized bound.
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