Skip to content

detect/analyzer: fix swapped output file pointers - #16180

Closed
cccs-will wants to merge 1 commit into
OISF:mainfrom
cccs-will:swapped-file-pointers-9007-v2
Closed

cccs-will wants to merge 1 commit into
OISF:mainfrom
cccs-will:swapped-file-pointers-9007-v2

Conversation

@cccs-will

Copy link
Copy Markdown
Contributor

EngineAnalysisFP(), CleanupFPAnalyzer(), and CleanupRuleAnalyzer() were writing to and closing the wrong FILE* pointers. Fast pattern output was written to rules_analysis.txt instead of rules_fast_pattern.txt, leaving the latter effectively empty.

Restore the behavior from before c8615bc, which inadvertently swapped the pointers.

Bug: 9007

Make sure these boxes are checked accordingly before submitting your Pull Request -- thank you.

Contribution style:

Our Contribution agreements:

Changes (if applicable):

Link to ticket: https://redmine.openinfosecfoundation.org/issues/9007

Describe changes:

Provide values to any of the below to override the defaults.

  • To use a Suricata-Verify or Suricata-Update pull request,
    link to the pull request in the respective _BRANCH variable.
  • Leave unused overrides blank or remove.

SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=

EngineAnalysisFP(), CleanupFPAnalyzer(), and CleanupRuleAnalyzer() were writing
to and closing the wrong FILE* pointers. Fast pattern output was written to
rules_analysis.txt instead of rules_fast_pattern.txt, leaving the latter
effectively empty.

Restore the behavior from before c8615bc, which inadvertently swapped the
pointers.

Bug: OISF#9007
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

NOTE: This PR may contain new authors.

@codecov

codecov Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.12%. Comparing base (b8084b3) to head (43c695b).
⚠️ Report is 120 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16180      +/-   ##
==========================================
- Coverage   83.14%   83.12%   -0.02%     
==========================================
  Files        1004     1004              
  Lines      277579   277581       +2     
==========================================
- Hits       230789   230742      -47     
- Misses      46790    46839      +49     
Flag Coverage Δ
fuzzcorpus 61.76% <66.66%> (+0.12%) ⬆️
livemode 18.42% <0.00%> (+0.02%) ⬆️
netns 22.82% <0.00%> (-0.06%) ⬇️
pcap 45.38% <0.00%> (-0.06%) ⬇️
suricata-verify 67.30% <100.00%> (-0.03%) ⬇️
unittests 58.54% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cccs-will

Copy link
Copy Markdown
Contributor Author

@victorjulien , are you able to find my CLA? (Previous PR: #16173.)

@jasonish

jasonish commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

@victorjulien , are you able to find my CLA? (Previous PR: #16173.)

You're good.

This:

NOTE: This PR may contain new authors.

Is based on a quick scan of your commit email address vs. previous commits.

@victorjulien victorjulien added this to the 9.0 milestone Sep 15, 2026
@victorjulien

Copy link
Copy Markdown
Member

Merged in #16219, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants