[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Function to detect Lua state and heap corruption
- From: Andrew Gierth <andrew@...>
- Date: Sun, 16 Jun 2019 14:46:06 +0100
>>>>> "Abhijit" == Abhijit Nandy <abhijit.nandy@gmail.com> writes:
Abhijit> I have a medium sized application, and sometimes the Lua state
Abhijit> gets corrupted probably due to forgetting to pop the correct
Abhijit> values or multiple threads accessing the state. While I have
Abhijit> taken measures to prevent this, we still sometimes get a heap
Abhijit> corruption that leads to a crash later, making the problematic
Abhijit> area difficult to pin point.
Abhijit> If there is a function that can be run to verify if everything
Abhijit> is fine after every Lua code execution request, that can help
Abhijit> to narrow down the bad code faster.
Did you already try enabling the API checks? That doesn't check the
whole state, but it does check the sanity of the arguments to every API
call.
--
Andrew.