Skip to content

Fix LuaNETBenchmark.cs#30

Open
tran-huynh-minh-ngoc wants to merge 1 commit intoVeslo5:mainfrom
tran-huynh-minh-ngoc:patch-1
Open

Fix LuaNETBenchmark.cs#30
tran-huynh-minh-ngoc wants to merge 1 commit intoVeslo5:mainfrom
tran-huynh-minh-ngoc:patch-1

Conversation

@tran-huynh-minh-ngoc
Copy link

@tran-huynh-minh-ngoc tran-huynh-minh-ngoc commented Nov 11, 2025

The code in LuaNetBenchmark.cs doesn't clean the Lua stack properly, that's why it crashes (stack overflow) in BenchmarkDotNet as BenchmarkDotNet runs a benchmark thousands of times in the same process. The simplest way is to use lua_gettop and lua_settop.

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

Comments