Skip to content

fix: unload OpenSSL providers before the ASAN leak check - #67

Merged
esrrhs merged 1 commit into
masterfrom
fix/asan-leak-exit
Nov 30, 2026
Merged

esrrhs merged 1 commit into
masterfrom
fix/asan-leak-exit

Conversation

@esrrhs

@esrrhs esrrhs commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • ASAN now runs with leak detection, and LeakSanitizer replaced flua's exit code when the OpenSSL legacy/default providers were still loaded. flua.set_exit / update's return therefore showed up as exit code 1.
  • Unload those providers from an atexit handler registered when they are loaded, so the check runs after OPENSSL_cleanup.
  • Free the VarInterface tables the jitter and native tests allocated. Those were the direct leaks in unit_tests.

Test plan

  • flua --jit_type=2 on a flua.set_exit(4) script exits 4
  • flua_host.*, the jitter table tests, test_native.test_native_var_interface_table_result, and test_crypto.* pass
  • ASAN build (asan) on CI is green

Made with Cursor

Leak detection now replaces flua's exit code when providers are still loaded, and a few tests left the VarInterface tables they allocated.

Co-authored-by: Cursor <cursoragent@cursor.com>
@esrrhs
esrrhs merged commit 45d065d into master Nov 30, 2026
6 of 9 checks passed
@esrrhs
esrrhs deleted the fix/asan-leak-exit branch November 30, 2026 08:02
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.56%. Comparing base (cb7229c) to head (f2095d2).
⚠️ Report is 2 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #67      +/-   ##
==========================================
- Coverage   94.56%   94.56%   -0.01%     
==========================================
  Files         129      129              
  Lines       32339    32349      +10     
==========================================
+ Hits        30582    30590       +8     
- Misses       1757     1759       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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