Skip to content

ci: statically link MinGW runtime into x86 fuzzy.dll and add 32-bit pool test - #3611

Open
A13501350 wants to merge 2 commits into
owasp-modsecurity:v2/masterfrom
A13501350:ci/x86-test
Open

ci: statically link MinGW runtime into x86 fuzzy.dll and add 32-bit pool test#3611
A13501350 wants to merge 2 commits into
owasp-modsecurity:v2/masterfrom
A13501350:ci/x86-test

Conversation

@A13501350

Copy link
Copy Markdown

Summary

Fixes #3599

The CI-produced x86 IIS module (fuzzy.dll, ssdeep) was built with MinGW gcc and imported the MinGW runtime DLLs (libgcc_s_dw2-1.dll -> libwinpthread-1.dll). These were not packaged in the MSI, so the x86 module failed to load in 32-bit application pools with error 126 (ERROR_MOD_NOT_FOUND), while the x64 module worked fine.

Fix

In .github/workflows/test-ci-windows.yml, build ssdeep with -static-libgcc so the MinGW runtime is statically linked into fuzzy.dll. The resulting x86 DLL is self-contained and loads cleanly in 32-bit application pools without needing the external MinGW runtime DLLs.

Regression test

Added a new Test IIS Module in 32-bit Application Pool step that:

  1. Verifies the globally-registered ModSecurity IIS (32bits) native module exists.
  2. Creates a dedicated 32-bit application pool and site, then confirms a request returns HTTP 200.
  3. Checks the Application event log for dll failed to load / error 126 entries.

The test was validated against the previous (broken) build: with the old dynamic-link build the 32-bit pool returned HTTP 503 (module failed to load) and the step correctly failed; with this fix it returns HTTP 200 and passes.

Validation

  • Fixed build: all jobs green, including the new 32-bit pool test (HTTP 200, no load errors).
  • Old build (temporary revert): the new 32-bit pool test correctly failed with unexpected status 503, confirming it reproduces and catches the x86 load issue.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1be1a09d-6d83-4de4-86c6-bda126d1b618

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

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

@sonarqubecloud

Copy link
Copy Markdown

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