Skip to content

ci: add ASan/LSan and UBSan jobs - #354

Merged
abhinavagarwal07 merged 1 commit into
libfuse:masterfrom
abhinavagarwal07:ci-sanitizers
Oct 22, 2026
Merged

abhinavagarwal07 merged 1 commit into
libfuse:masterfrom
abhinavagarwal07:ci-sanitizers

Conversation

@abhinavagarwal07

@abhinavagarwal07 abhinavagarwal07 commented May 19, 2026 •

Copy link
Copy Markdown
Collaborator

Add sanitizers.yml with two jobs, both clang with -Db_sanitize and -Db_lundef=false, running the full test suite:

  • ASan + LeakSanitizer (detect_leaks=1, using the existing test/lsan_suppress.txt)
  • UBSan (halt_on_error=1)

Reports are written to files and a final step prints them and fails the job if there are any, so tests that expect sshfs to fail can't hide a report. The job also fails if any test was skipped, so a missing FUSE prerequisite can't quietly drop the mount tests. Runs on PRs and on pushes to master.

The LSan job found a real leak of the cached symlink target in cache.c, fixed in #390.

@abhinavagarwal07
abhinavagarwal07 force-pushed the ci-sanitizers branch 9 times, most recently from a99808e to e6667c2 Compare May 22, 2026 01:35
@abhinavagarwal07
abhinavagarwal07 requested a balanced review from Copilot October 22, 2026 09:24
@abhinavagarwal07
abhinavagarwal07 marked this pull request as ready for review October 22, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Sanitizer jobs can pass despite sanitizer reports or silently skipped filesystem integration tests.

2 open issues
What changed in this PR

Adds sanitizer CI coverage for sshfs and frees cached symlink targets when cache nodes are destroyed.

Changes:

  • Adds required ASan and UBSan jobs plus an advisory ASan+LeakSanitizer job.
  • Configures SSH/FUSE preflights, test timeouts, JUnit results, and sanitizer log artifacts.
  • Frees node->link during cache-node cleanup.
File Description
cache.c Releases cached symlink storage when freeing a node.
.github/​workflows/​sanitizers.yml Adds sanitizer builds, integration-test execution, and diagnostic artifacts.

Review effort: Balanced

Comment thread .github/workflows/sanitizers.yml
Comment thread .github/workflows/sanitizers.yml
@abhinavagarwal07 abhinavagarwal07 changed the title ci: add ASan and UBSan CI jobs ci: add ASan/LSan and UBSan jobs Oct 22, 2026
@abhinavagarwal07
abhinavagarwal07 requested a balanced review from Copilot October 22, 2026 09:44
Build with clang and -Db_sanitize and run the test suite under ASan with
LeakSanitizer and under UBSan. Reports are written to files and a final
step prints them and fails the job if there are any, so tests that expect
sshfs to fail can't hide one. The job also fails if any test was skipped.
LSan uses the existing test/lsan_suppress.txt; it caught the free_node
leak fixed in libfuse#390.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

LSan suppression summaries can cause otherwise successful ASan runs to fail the report check.

1 open issue
2 resolved since last review

Review effort: Balanced

- name: Test
env:
ASAN_OPTIONS: "${{ matrix.sanitizer == 'asan' && format('{0}:log_path={1}/sanitizer/asan', matrix.san_opts, runner.temp) || '' }}"
LSAN_OPTIONS: "${{ matrix.sanitizer == 'asan' && format('suppressions={0}/test/lsan_suppress.txt', github.workspace) || '' }}"
@abhinavagarwal07
abhinavagarwal07 merged commit f7c851b into libfuse:master Oct 22, 2026
19 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.

2 participants