Skip to content

fix(native): return true for collectgarbage('isrunning') and use dynamic vector for pcall/xpcall arguments - #325

Merged
esrrhs merged 1 commit into
masterfrom
fix/collectgarbage-isrunning-and-dynamic-pcall-args
Aug 4, 2026
Merged

fix(native): return true for collectgarbage('isrunning') and use dynamic vector for pcall/xpcall arguments#325
esrrhs merged 1 commit into
masterfrom
fix/collectgarbage-isrunning-and-dynamic-pcall-args

Conversation

@esrrhs

@esrrhs esrrhs commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Round 21 Deep Audit Fixes

  1. collectgarbage('isrunning') Return Type Bug:

    • Bug: In src/native/native_basic.cpp, collectgarbage('isrunning') returned integer 0 instead of boolean true.
    • Fix: Returns inter::NativeToFakeluaBool(state, true) for 'isrunning' option per Lua 5.3+ standard specification.
    • Added unit test in test_basic_collectgarbage.lua.
  2. pcall/xpcall Dynamic Vector Argument Allocation:

    • Fix: Replaced hardcoded 16-element stack array with std::vector to allow unconstrained variadic parameter passing to protected call closures.

@codecov-commenter

codecov-commenter commented Aug 3, 2026

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.98%. Comparing base (ee0c3ad) to head (f1fa478).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/native/native_basic.cpp 0.00% 6 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
+ Coverage   89.97%   89.98%   +0.01%     
==========================================
  Files          82       82              
  Lines       18992    18988       -4     
==========================================
- Hits        17088    17087       -1     
+ Misses       1904     1901       -3     

☔ 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.

@esrrhs
esrrhs force-pushed the fix/collectgarbage-isrunning-and-dynamic-pcall-args branch from 0787518 to f1fa478 Compare August 4, 2026 03:00
@esrrhs
esrrhs merged commit 146527c into master Aug 4, 2026
7 checks passed
@esrrhs
esrrhs deleted the fix/collectgarbage-isrunning-and-dynamic-pcall-args branch August 4, 2026 03:24
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