Skip to content

fix: v0.5.37 — engine cleanup in cmd_qualify, CodeQL comment fix#57

Merged
SoundMatt merged 1 commit into
mainfrom
fix/ci-abort-codeql
Jul 26, 2026
Merged

fix: v0.5.37 — engine cleanup in cmd_qualify, CodeQL comment fix#57
SoundMatt merged 1 commit into
mainfrom
fix/ci-abort-codeql

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

  • Engine cleanup in cmd_qualify: adds cfusa_engine_reset() at the end of cmd_qualify() to clear the global rule table after the qualification exercise suite. Without this, helper functions (qt_run_safety_rules, qt_run_cyber_rules, etc.) leave the engine pointing at freed stack-frame memory. On Linux, glibc malloc detects this heap corruption at the next allocation — inside test_cli_commands — causing a SIGABRT ("Subprocess aborted") on ubuntu-22.04 CI.
  • CodeQL comment fix: replaces the inline JSON format example in the parse_mcdc_json() block comment with prose, eliminating the CodeQL CWE "Commented-out code" false-positive alert.

Test plan

  • Release CI passes on ubuntu-22.04 (test_cli_commands no longer aborts)
  • Release CI passes on macos-latest
  • No new CodeQL alerts for cmd_coverage.c

Add cfusa_engine_reset() at the end of cmd_qualify() to clear stale
global rule-table state after the qualification exercise suite. Without
this, helper functions (qt_run_safety_rules etc.) leave the engine
pointing at freed stack memory, which glibc malloc detects as heap
corruption (SIGABRT) at the next allocation inside test_cli_commands on
ubuntu-22.04.

Also replace the inline JSON format example in the parse_mcdc_json()
block comment with prose, eliminating the CodeQL "Commented-out code"
false-positive alert.

Signed-off-by: SoundMatt <SoundMatt@users.noreply.github.com>
Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit 9d08a7f into main Jul 26, 2026
10 checks passed
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